Some bip39-en cleanups (& tests) (#1295)

This commit is contained in:
Jaco
2021-12-08 10:43:43 +02:00
committed by GitHub
parent 1a6f81e2a7
commit a938a9f998
2 changed files with 15 additions and 2048 deletions
File diff suppressed because one or more lines are too long
@@ -0,0 +1,14 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import DEFAULT_WORDLIST from './bip39-en';
describe('wordlist', (): void => {
it('has the correct number of words', (): void => {
expect(DEFAULT_WORDLIST).toHaveLength(2048);
});
it('has no empty words', (): void => {
expect(DEFAULT_WORDLIST.some((n) => !n.length || n.trim() !== n)).toEqual(false);
});
});