aboutsummaryrefslogtreecommitdiff
path: root/test/content/repositories/MarkKeyRepository.test.ts
blob: 8592332bdbeb6a35782478fd937ecbc370dc2a66 (plain) (blame)
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
27
28
29
30
31
32
33
34
35
36
import MarkRepository, { MarkKeyRepositoryImpl }
  from '../../../src/content/repositories/MarkKeyRepository';
import { expect } from 'chai';

describe('MarkKeyRepositoryImpl', () => {
  let sut: MarkRepository;

  before(() => {
    sut = new MarkKeyRepositoryImpl();
  })

  describe('#isSetMode/#enableSetMode/#disabeSetMode', () => {
    it('enables and disables set mode', () => {
      expect(sut.isSetMode()).to.be.false;

      sut.enableSetMode();
      expect(sut.isSetMode()).to.be.true;

      sut.disabeSetMode();
      expect(sut.isSetMode()).to.be.false;
    });
  });

  describe('#isJumpMode/#enableJumpMode/#disabeJumpMode', () => {
    it('enables and disables jump mode', () => {
      expect(sut.isJumpMode()).to.be.false;

      sut.enableJumpMode();
      expect(sut.isJumpMode()).to.be.true;

      sut.disabeJumpMode();
      expect(sut.isJumpMode()).to.be.false;
    });
  });
});