it("should create a bookmark with the correct attributes on the text element", () => { const newJson = Utility.jsonify(bookmark); assert.equal(JSON.stringify(newJson.text.root[1].root[1]), JSON.stringify("Internal Link")); });
it('leap year', function () { assert.equal(moment([2010, 0, 1]).isLeapYear(), false, '2010'); assert.equal(moment([2100, 0, 1]).isLeapYear(), false, '2100'); assert.equal(moment([2008, 0, 1]).isLeapYear(), true, '2008'); assert.equal(moment([2000, 0, 1]).isLeapYear(), true, '2000'); });
it('should call Terminal.setOption with correct params', () => { let options = {}; let terminal = { setOption: (option, value) => options[option] = value }; let inputHandler = new InputHandler(terminal); inputHandler.setCursorStyle([0]); assert.equal(options['cursorStyle'], 'block'); assert.equal(options['cursorBlink'], true); options = {}; inputHandler.setCursorStyle([1]); assert.equal(options['cursorStyle'], 'block'); assert.equal(options['cursorBlink'], true); options = {}; inputHandler.setCursorStyle([2]); assert.equal(options['cursorStyle'], 'block'); assert.equal(options['cursorBlink'], false); options = {}; inputHandler.setCursorStyle([3]); assert.equal(options['cursorStyle'], 'underline'); assert.equal(options['cursorBlink'], true); options = {}; inputHandler.setCursorStyle([4]); assert.equal(options['cursorStyle'], 'underline'); assert.equal(options['cursorBlink'], false); options = {}; inputHandler.setCursorStyle([5]); assert.equal(options['cursorStyle'], 'bar'); assert.equal(options['cursorBlink'], true); options = {}; inputHandler.setCursorStyle([6]); assert.equal(options['cursorStyle'], 'bar'); assert.equal(options['cursorBlink'], false); });
it("should create have valid properties", () => { const stringifiedJson = JSON.stringify(paragraph); const newJson = JSON.parse(stringifiedJson); assert.equal(newJson.root[0].rootKey, "w:pPr"); });