ldgit / argus Goto Github PK
View Code? Open in Web Editor NEWWatches your files and executes unit tests for them
License: MIT License
Watches your files and executes unit tests for them
License: MIT License
Current behavior if no test file found is to run all the tests for project.
Default configuration was unnecessarily specific to PHP.
Breaks on Windows 10 (powershell).
The official docs are here.
This is related to chokidar bug that causes ready
event to never fire when watching globs with nonexisting directories or files.
Because of course not...
For example, if npm t
runs all our unit tests, current test runner command format would be:
module.exports = {
{
// ...
arguments: ['t', '--'],
testRunnerCommand: 'npm',
// ...
},
],
};
New format:
module.exports = {
{
// ...
testRunnerCommand: { command: 'npm', arguments: ['t', '--'] },
// ...
},
],
};
This would make it consistent with the format of runAllTestsCommand
.
For example, print info message if test not found for file.
Add verbose CLI option (-v) that could show more info in terminal:
... and run it on each build.
Users should be able to tell argus what files to watch and how to run tests on them if they change.
To support this, user should define special config file.
Current proposal is a javascript module describing different environments, for example:
module.exports = {
environments: [
{
extension: 'php',
testNameSuffix: 'Test',
testDir: 'tests/unit',
sourceDir: 'src',
arguments: ['--colors'],
testRunnerCommand: 'vendor/bin/phpunit',
},
{
extension: 'js',
testNameSuffix: '.test',
testDir: 'tests/unit',
sourceDir: 'src',
arguments: [],
testRunnerCommand: 'node_modules/.bin/mocha',
},
],
};
This would have following benefits:
To mantain BC, if no configuration file is found a special default configuration will be used.
Currently, argus needs to restarted in order to watch new tests. This could be changed so that test file creation is detected automatically and new tests and source files added to watchlist.
Some basic user commands to implement:
l
to list all available commandsa
to run all tests - this would simply run testRunnerCommand
from each environment without any file argumentsr
to rerun last run batch of testsA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.