Skip to content

Commit

Permalink
repetitions.test: increase timeout for ARM builds in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-nic committed Oct 27, 2023
1 parent f7c9fe7 commit cf1d061
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/repetitions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ test('salt_length', () => {
return Promise.all(Array.from({length: EXPECTED},
() => bcrypt.genSalt(10)
.then(salt => expect(salt).toHaveLength(29))));
})
}, 10e3)

test('test_hash_length', () => {
expect.assertions(EXPECTED);
const SALT = '$2a$04$TnjywYklQbbZjdjBgBoA4e';
return Promise.all(Array.from({length: EXPECTED},
() => bcrypt.hash('test', SALT)
.then(hash => expect(hash).toHaveLength(60))));
})
}, 10e3)

test('test_compare', () => {
expect.assertions(EXPECTED);
const HASH = '$2a$04$TnjywYklQbbZjdjBgBoA4e9G7RJt9blgMgsCvUvus4Iv4TENB5nHy';
return Promise.all(Array.from({length: EXPECTED},
() => bcrypt.compare('test', HASH)
.then(match => expect(match).toEqual(true))));
})
}, 10e3)

test('test_hash_and_compare', () => {
expect.assertions(EXPECTED * 3);
Expand All @@ -42,5 +42,5 @@ test('test_hash_and_compare', () => {
return Promise.all([goodCompare, badCompare]);
});
}));
}, 10000);
}, 30e3);

0 comments on commit cf1d061

Please sign in to comment.