I am trying to put together a test suite. I have several very basic tests.
However, one test always fails, but only fails when running all the tests together.
So if I run it like this, this happens:
$ testcafe chrome test-cafe/tests/*.js
(some tests pass...)
1) A call to an async function is not awaited. Use the "await" keyword before actions, assertions or chains of them to ensure that they run in the
right sequence.
Browser: Chrome 66.0.3359 / Mac OS X 10.13.4
22 |test('Menu Testing', async t => {
23 | await t
24 | t.useRole( PlatformApp.basicUserRole )
> 25 | // debugger
26 | await t
27 | .expect(Selector('.search').innerText).eql("search\nSearch")
28 | .expect(Selector('.subscriptions').innerText).eql("subscriptions\nSubscriptions")
29 | .expect(Selector('.schedule').innerText).eql("event_available\nSchedule")
at <anonymous> (/Users/me/myapp/__test-cafe__/tests/menus.js:25:5)
Note the "error" is often on a comment line, or on the await itself (the one it says it needs).
But if I run it as
$ testcafe chrome test-cafe/tests/menus.js
Then the same test runs fine.
$ testcafe --version
Using locally installed version of TestCafe.
0.19.2
Does anyone know why this is?