Code coverage report for test/unit/base/core/key.spec.js

# all files / test/unit/base/core/ key.spec.js

100% Statements 12/12
100% Branches 0/0
100% Functions 6/6
100% Lines 12/12

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26

    1×
    1×

    1×

    1×
    1×
    1×
    1×

    1×
    1×

    1×
    1×
    1×

     /**
     * key.spec.js
     * (c) 2013~ Alan Hong
     * summernote may be freely distributed under the MIT license./
     */
    import chai from 'chai';
    import key from '../../../../src/js/base/core/key';

    var expect = chai.expect;

    describe('base:core.key', () => {
      describe('isEdit', () => {
        it('should return true for BACKSPACE', () => {
          expect(key.isEdit(key.code.BACKSPACE)).to.be.true;
        });
        it('should return true for DELETE', () => {
          expect(key.isEdit(key.code.DELETE)).to.be.true;
        });
      });
      describe('isMove', () => {
        it('should return true for LEFT', () => {
          expect(key.isMove(key.code.LEFT)).to.be.true;
        });
      });
    });