avajs / ava

Node.js test runner that lets you develop with confidence 🚀
MIT License
20.74k stars 1.41k forks source link

Examples use AVA 3 #2993

Open jaapz opened 2 years ago

jaapz commented 2 years ago

In examples dir in the ava repo, TestInterface is still used, even though it's now called TestFn


@novemberborn: in fact all examples are using AVA 3 and need updating: https://github.com/avajs/ava/tree/a8981540100653d99d1fe9476737751eeae50b33/examples

novemberborn commented 2 years ago

Is that this one? https://github.com/avajs/ava/tree/a8981540100653d99d1fe9476737751eeae50b33/examples/typescript-context

I think all those examples need updating to AVA 4. Will adjust this issue to reflect.

simplenotezy commented 2 years ago

Thanks for sharing the TestFn rename from TestInterface. That was the main thing that had to be changed when upgrading from 3 to 4, and it wasn't referenced in the Changelog/releases section (https://github.com/avajs/ava/releases?q=TestFn&expanded=true)

Despite upgrade from 3 to 4 so far have been smooth, I have an issue related to upgrading from 3 to 4. Currently only one of my test folders run (the first one).

When I run:

cross-env NODE_ENV=test ava --verbose --timeout 1m

It will only run the first folder inside my ./test/ folder.

I added this issue here, as it might relate to upgrading from 3 to 4.

simplenotezy commented 2 years ago

Strange. I ran npm init ava (depsite it was only an upgrade), and then ran npm test again, and then it worked.

novemberborn commented 2 years ago

AVA 5 is now available, though with minor changes. There was a PR for this but it has stalled: https://github.com/avajs/ava/pull/3017

simwai commented 6 months ago

Here is TestInterface used too: https://github.com/avajs/ava/blob/ec1a8d2336e55011aaea966c2273bb86e4dafa88/examples/typescript-context/source/test.ts#L2

sculpt0r commented 5 months ago

Hi, @novemberborn - what is the status here? We still needs to update the entire documentation - right?

It needs to be from scratch, or there is some ongoing PR?

novemberborn commented 4 months ago

@sculpt0r still needs doing, yes.

I don't see any open PR around this.