Get help with testing, discuss unit testing strategies etc.

Post by Clothia C »

Is it possible to use some kind of await in a Test.


describe('Sanity Test', t => {"Sanity", t => {
        t.diag("Sanity test");
	    // something like this
	    await t.ok(foo, 'foo => Available after 5 seconds');
	    // not continue before foo available

Post by nickolay »

Of course, just declare the test function as async:"Sanity", async t => {...})

Post by Clothia C »

Works great, thanks

Post Reply