Removed non-english tests from the browser.

This commit is contained in:
Richard Moore 2021-10-17 16:18:22 -04:00
parent 2f363da5ff
commit 91c577b611
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

View File

@ -25,11 +25,15 @@ function checkRandom(name: string): boolean {
return true;
}
const isBrowser = (typeof(navigator) !== "undefined");
describe('Test HD Node Derivation is Case Agnostic', function() {
let tests: Array<TestCase.HDWallet> = loadTests('hdnode');
tests.forEach((test) => {
if (!checkRandom(test.name)) { return; }
if (isBrowser && test.locale !== "en") { return; }
it("Normalizes case - " + test.name, function() {
this.timeout(10000);
let wordlist = (<{ [ locale: string ]: ethers.Wordlist }>(ethers.wordlists))[test.locale];
@ -54,6 +58,8 @@ describe('Test HD Node Derivation from Seed', function() {
// If there is nothing to derive, skip this portion of the test
if (test.hdnodes.length === 0) { return; }
if (isBrowser && test.locale !== "en") { return; }
it('Derives the HD nodes - ' + test.name, function() {
this.timeout(10000);
@ -79,6 +85,8 @@ describe('Test HD Node Derivation from Mnemonic', function() {
tests.forEach((test) => {
if (!checkRandom(test.name)) { return; }
if (isBrowser && test.locale !== "en") { return; }
// If there is nothing to derive, skip this portion of the test
if (test.hdnodes.length === 0) { return; }
@ -114,6 +122,8 @@ describe('Test HD Mnemonic Phrases', function testMnemonic() {
tests.forEach(function(test) {
if (!checkRandom(test.name)) { return; }
if (isBrowser && test.locale !== "en") { return; }
it(('converts mnemonic phrases - ' + test.name), function() {
this.timeout(1000000);