add Follow test

jh-changes
Shin'ya Ueoka 7 years ago
parent 355da18d3d
commit 55147feb8e
  1. 14
      test/content/follow.test.js

@ -0,0 +1,14 @@
import { expect } from "chai";
import Follow from '../../src/content/follow';
describe('Follow class', () => {
describe('#codeChars', () => {
it('returns a string for key codes', () => {
let chars = [
KeyboardEvent.DOM_VK_0, KeyboardEvent.DOM_VK_1,
KeyboardEvent.DOM_VK_A, KeyboardEvent.DOM_VK_B];
expect(Follow.codeChars(chars)).to.equal('01ab');
expect(Follow.codeChars([])).to.be.equal('');
});
});
});