You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detected awaiting a value that is not a "Thenable" (an object which has a then method, such as a Promise).
While it is valid JavaScript to await a non-Promise-like value (it will resolve immediately), this pattern is often a programmer error, such as forgetting to add parenthesis to call a function that returns a Promise.
DESCRIPTION
Detected awaiting a value that is not a "Thenable" (an object which has a then method, such as a Promise).
While it is valid JavaScript to await a non-Promise-like value (it will resolve immediately), this pattern is often a programmer error, such as forgetting to add parenthesis to call a function that returns a Promise.
BAD PRACTICE
await 'value';
const createValue = () => 'value';
await createValue();
RECOMMENDED
await Promise.resolve('value');
const createValue = async () => 'value';
await createValue();
Look here: Unexpected await of a non-Promise (non-"Thenable") value
src/implementations/deterministic/mnemonic-phrase.spec.ts
});
it('creates mnemonic correctly', async () => {
const mnemonic = await MnemonicPhrase.create();
return expect(mnemonic.mnemonicPhrase).toEqual(fMnemonicPhrase);
});
Give star and donate for my work :)
The text was updated successfully, but these errors were encountered: