mirror of
https://github.com/seejohnrun/haste-server.git
synced 2026-02-09 10:41:34 +00:00
Improve tests (#407)
* Improve tests This PR adds some necessary tests, fixes the naming on describe (everything was set to RandomKeyGenerator, perhaps a copy/paste exception) and fixes the consonant/vowel alternation test, since it was failing if the keyspace started with a vowel. * Remove unecessary file
This commit is contained in:
@@ -6,8 +6,8 @@ const fs = require('fs');
|
||||
|
||||
const Generator = require('../../lib/key_generators/dictionary');
|
||||
|
||||
describe('RandomKeyGenerator', function() {
|
||||
describe('randomKey', function() {
|
||||
describe('DictionaryGenerator', function() {
|
||||
describe('options', function() {
|
||||
it('should throw an error if given no options', () => {
|
||||
assert.throws(() => {
|
||||
new Generator();
|
||||
@@ -19,7 +19,8 @@ describe('RandomKeyGenerator', function() {
|
||||
new Generator({});
|
||||
}, Error);
|
||||
});
|
||||
|
||||
});
|
||||
describe('generation', function() {
|
||||
it('should return a key of the proper number of words from the given dictionary', () => {
|
||||
const path = '/tmp/haste-server-test-dictionary';
|
||||
const words = ['cat'];
|
||||
|
||||
Reference in New Issue
Block a user