Skip to content

Commit

Permalink
Add tests for keyboard shortcut button titles
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas committed Feb 9, 2017
1 parent adfc636 commit 36814ac
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
10 changes: 10 additions & 0 deletions lib/api/behavior.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ describe('behavior', () => {
});
});

describe('#getKeyboardShortcut', () => {
it('exists', () => {
expect(behavior.getKeyboardShortcut).toBeDefined();
});

it('header five shortcut', () => {
expect(behavior.getKeyboardShortcut(BLOCK_TYPE.HEADER_FIVE)).toBe('ctrl + alt + 5');
});
});

describe('#getBeforeInputBlockType', () => {
it('exists', () => {
expect(behavior.getBeforeInputBlockType).toBeDefined();
Expand Down
24 changes: 23 additions & 1 deletion lib/api/constants.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
import { BLOCK_TYPE, ENTITY_TYPE, INLINE_STYLE, KEY_CODES, NBSP, HANDLED, NOT_HANDLED } from '../api/constants';
import {
BLOCK_TYPE,
ENTITY_TYPE,
INLINE_STYLE,
BR_TYPE,
KEY_CODES,
KEYBOARD_SHORTCUTS,
NBSP,
HANDLED,
NOT_HANDLED,
} from '../api/constants';

describe('constants', () => {
describe('#BLOCK_TYPE', () => {
Expand All @@ -19,12 +29,24 @@ describe('constants', () => {
});
});

describe('#BR_TYPE', () => {
it('exists', () => {
expect(BR_TYPE).toBeDefined();
});
});

describe('#KEY_CODES', () => {
it('exists', () => {
expect(KEY_CODES).toBeDefined();
});
});

describe('#KEYBOARD_SHORTCUTS', () => {
it('exists', () => {
expect(KEYBOARD_SHORTCUTS).toBeDefined();
});
});

describe('#NBSP', () => {
it('exists', () => {
expect(NBSP).toBeDefined();
Expand Down

0 comments on commit 36814ac

Please sign in to comment.