Comments (16)
or nodemon
{
"scripts": {
"test": "nodemon test/*.js --exec ava"
}
}
from ava.
You could probably just use the onchange module.
{
"scripts": {
"test": "onchange 'test/*.js' -- ava test/*.js"
}
}
from ava.
In fact I would be cool, if ava could run only changed test in a file, not a whole file with tests.
from ava.
I think the common use case is watching the source directory and the test directory (not only the current existing files). And I suppose that the sources change far more often than the test.
from ava.
There is also the watch unix command.
But none of these can be compared to ava supporting filewatching internally. I love the fast feedback loop mocha -w
gives me, and would ❤️ to see ava
have this feature.
from ava.
This is now PR welcome. Should use https://github.com/paulmillr/chokidar.
@tomazzaman has indicated in #458 that he's interested in working on this.
from ava.
@sindresorhus Are you sure AVA is ready for this feature? We have lots of perf/babel issues on the table to solve. Watch feature is not that important like providing great experience (especially first experience) to the users.
from ava.
@vdemedes I'm afraid of that too, but I'm thinking we add it undocumented, dogfood it, and only document it when we feel it's stable enough and we're ready to take on the addition support burden. And many people have told me watch
is a big reason for them to stay with Mocha, which makes me think watch
is part of providing a great experience.
from ava.
@sindresorhus Ok, sounds like a plan ;)
from ava.
I too come from Mocha-world and this was by far bigger selling point than speed. I want continuous feedback loop more than speed.
from ava.
@tomazzaman Thanks. The more usage feedback we get on issues, the easier it is for us to make informed choices :) Feel free to comment opinions on any other issue. You might also like #115.
from ava.
Ha! Indeed I like it, but not sure whether my JS skills are there yet. I've written a few watchers for my own projects (so I know a thing or two about it), but nothing as complex as #115. Maybe I'm just needlessly intimidated though :)
from ava.
@tomazzaman I didn't mean you should do it. Just that you might find the idea interesting ;)
from ava.
I'd be happy to take this on. I've used watchers extensively when building dev stacks.
from ava.
@novemberborn @sindresorhus I've created a PR #465 , just a basic watcher for now, but works. I'd be more than happy to hear your feedback to learn whether I'm on the right track
from ava.
This needs to be taken into account: babel/babel#3307
from ava.
Related Issues (20)
- AVA hangs after all tests pass HOT 2
- Support a proper junit reporter
- Monorepo with babel aliases support HOT 1
- The watch mode does not work in v6 HOT 4
- Ability to run a mixed test code base using node:test HOT 2
- Azure DevOps output handler
- Typescript with VS Code debug issue
- config to control handling for tests that 'Failed to exit' - v6+ issue HOT 3
- Ava fails to run in watch mode via CLI HOT 2
- Documentation Request: Using a Node Custom Loader
- Add support for `--env-file=` flag for node 20 in `nodeArguments`
- Spurious "previous failures in test files that were not rerun" in watch mode HOT 2
- registerCompletionHandler can't be used in CommonJS project HOT 1
- Allow regexes in `t.like` HOT 2
- failing async test ends in timeout instead of go to catch clause
- `t.throws` doesn't recognize falsy thrown values
- `t.inRange`
- Ava won't work with yarn workspaces package named `business-logic` HOT 1
- Tap reporter outputs internal stack traces HOT 2
- Add support for Node 22 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ava.