diff options
Diffstat (limited to 'test/content/usecases/HintKeyProducer.test.ts')
-rw-r--r-- | test/content/usecases/HintKeyProducer.test.ts | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/test/content/usecases/HintKeyProducer.test.ts b/test/content/usecases/HintKeyProducer.test.ts index 5841ae9..f7e02ea 100644 --- a/test/content/usecases/HintKeyProducer.test.ts +++ b/test/content/usecases/HintKeyProducer.test.ts @@ -1,20 +1,34 @@ -import HintKeyProducer from '../../../src/content/usecases/HintKeyProducer'; -import { expect } from 'chai'; +import HintKeyProducer from "../../../src/content/usecases/HintKeyProducer"; +import { expect } from "chai"; -describe('HintKeyProducer class', () => { - describe('#constructor', () => { - it('throws an exception on empty charset', () => { - expect(() => new HintKeyProducer('')).to.throw(TypeError); +describe("HintKeyProducer class", () => { + describe("#constructor", () => { + it("throws an exception on empty charset", () => { + expect(() => new HintKeyProducer("")).to.throw(TypeError); }); }); - describe('#produce', () => { - it('produce incremented keys', () => { - const charset = 'abc'; + describe("#produce", () => { + it("produce incremented keys", () => { + const charset = "abc"; const sequences = [ - 'a', 'b', 'c', - 'aa', 'ab', 'ac', 'ba', 'bb', 'bc', 'ca', 'cb', 'cc', - 'aaa', 'aab', 'aac', 'aba'] + "a", + "b", + "c", + "aa", + "ab", + "ac", + "ba", + "bb", + "bc", + "ca", + "cb", + "cc", + "aaa", + "aab", + "aac", + "aba", + ]; const producer = new HintKeyProducer(charset); for (let i = 0; i < sequences.length; ++i) { |