Closed fregante closed 4 years ago
It's hard to know quite where to place that file, though.
I've opened https://github.com/avajs/create-ava/issues/15 — we could really do with a "wizard" style process where we ask the user some questions and then do a nice AVA setup.
It's hard to know quite where to place that file, though.
Why hard to know? It's the same position as package.json by default. If the user needs more code they can just move it to test/blah.js
just like they can change the configuration.
I don't think the point of create-ava
is to cover every AVA feature in a single command. Surely a wizard would be nice, but the creation of test.js
would be a reasonable default just like "test": "ava"
is
For a TypeScript project folks would expect a test.ts
file, but probably in a src
or source
.
Others might prefer a module.test.js
file and wrongly conclude that's not supported.
Sorry, that doesn’t make sense.
Typescript users still have to add configuration if they want direct support from AVA, would that make them “wrong conclude that typescript is not supported?”
I’m suggesting here to have smart defaults to save some time. As far as I know Sindre prefers no-config tools with smart defaults as well.
Either way for the end user it’s easier to move/rename this test.js
than it is to create one and fill it with the boilerplate. I hope you agree with this
I kinda expected this package to also create a test file. Compared to running
npm i ava -D
it only adds"test": "ava"
. Almost not worth it 😄Also it should run
ava
right away, perhaps, but it might fail.