fix(tests): expectations of some async test where not working (#989)
This commit is contained in:
committed by
Angelos Chalaris
parent
c89fd04ced
commit
f4df77d62f
@ -3,8 +3,10 @@ const {hashNode} = require('./_30s.js');
|
||||
test('hashNode is a Function', () => {
|
||||
expect(hashNode).toBeInstanceOf(Function);
|
||||
});
|
||||
test('Produces the appropriate hash', () => {
|
||||
hashNode(JSON.stringify({ a: 'a', b: [1, 2, 3, 4], foo: { c: 'bar' } })).then(v =>
|
||||
expect(v).toBe('04aa106279f5977f59f9067fa9712afc4aedc6f5862a8defc34552d8c7206393')
|
||||
test("Produces the appropriate hash", () => {
|
||||
expect(
|
||||
hashNode(JSON.stringify({ a: "a", b: [1, 2, 3, 4], foo: { c: "bar" } }))
|
||||
).resolves.toBe(
|
||||
"04aa106279f5977f59f9067fa9712afc4aedc6f5862a8defc34552d8c7206393"
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user