Skip to content

Commit dfcee61

Browse files
authored
Updated README.md for 2.0.0
1 parent 84562a5 commit dfcee61

File tree

1 file changed

+16
-29
lines changed

1 file changed

+16
-29
lines changed

README.md

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,31 @@ Argus test runner
55

66
Watches your files and executes automated tests for them when they change.
77

8+
## Note
9+
These are the docs for **2.0.0** version. For **1.4.1** version documentation see [here](../1.4.1/README.md).
10+
811
## Requirements
9-
* [Node.js](https://nodejs.org/en/) v6.* or greater
10-
* npm 3 or greater
12+
* [Node.js](https://nodejs.org/en/) v8.* or greater
13+
* npm 5 or greater
1114

1215
## Installation
1316

1417
### Global installation
1518
1. ```npm install -g argus-test-runner```
16-
30. Navigate to your project root and type ```argus``` to start watching
19+
15. Navigate to your project root
20+
20. Create a configuration file named `argus.config.js` (see [configuration examples](#configuration-file-examples))
21+
30. Type ```argus``` to start watching
1722
50. Type ```argus -h``` for usage information
1823

1924
### Local installation
2025
1. If you already have a package.json in your project, you can also install argus-test-runner locally
2126
20. Navigate to your project root and type ```npm install --save-dev argus-test-runner```
27+
25. Create a configuration file named `argus.config.js` (see [configuration examples](#configuration-file-examples))
2228
30. Start Argus with ```./node_modules/.bin/argus```
2329
40. You can also add an npm script for convenience in your package.json:
2430
```json
2531
"devDependencies": {
26-
"argus-test-runner": "^1.1.1"
32+
"argus-test-runner": "^2.0.0"
2733
},
2834
"scripts": {
2935
"argus": "argus"
@@ -35,21 +41,7 @@ To stop watching files just press ```Ctrl + C```
3541

3642
## Configuration
3743

38-
### Default configuration (**deprecated**)
39-
Default configuration is set up so that:
40-
* [PHPUnit](https://phpunit.de/) tests are run (using ```vendor/bin/phpunit```)
41-
* your project must keep it's tests in one of these four locations:
42-
1. tests/unit/
43-
20. test/unit/
44-
30. tests/
45-
40. test/
46-
* test file names must end with ```*Test.php```
47-
* directory structure inside your project test directory must mirror project root directory for tests to be found
48-
49-
**Default configuration is deprecated**, from version **2.0.0** and up you **will** have to specify a config file.
50-
51-
### Custom configuration
52-
You can define your own custom configuration by creating a configuration file. By default, ```argus``` looks for the configuration file named ```argus.config.js``` in the directory in which it is run, but you can specify a different location via ```-c``` console parameter, for example ```argus -c ../my.custom.argus.config.js```.
44+
You must configure argus-test-runner by creating a configuration file. By default, ```argus``` looks for the configuration file named ```argus.config.js``` in the directory in which it is run, but you can specify a different location via ```-c``` console parameter, for example ```argus -c ../my.custom.argus.config.js```.
5345
Configuration files are written in *Javascript*.
5446

5547
### Configuration file examples:
@@ -66,8 +58,7 @@ module.exports = {
6658
// Test directory mirrors your source directory structure
6759
testDir: 'tests',
6860
sourceDir: 'src',
69-
arguments: [],
70-
testRunnerCommand: 'vendor/bin/phpunit',
61+
testRunnerCommand: { command: 'vendor/bin/phpunit', arguments: [] },
7162
},
7263
],
7364
};
@@ -83,8 +74,7 @@ module.exports = {
8374
testNameSuffix: 'Test',
8475
testDir: 'tests/unit',
8576
sourceDir: 'src',
86-
arguments: [],
87-
testRunnerCommand: 'vendor/bin/phpunit',
77+
testRunnerCommand: { command: 'vendor/bin/phpunit', arguments: [] },
8878
},
8979
// Integration environment
9080
{
@@ -94,8 +84,7 @@ module.exports = {
9484
sourceDir: 'src',
9585
// If you are using a different configuration file for your integration tests, you can specify it in the
9686
// arguments list
97-
arguments: ['-c', 'phpunit-integration.xml'],
98-
testRunnerCommand: 'vendor/bin/phpunit',
87+
testRunnerCommand: { command: 'vendor/bin/phpunit', arguments: ['-c', 'phpunit-integration.xml'] },
9988
},
10089
],
10190
};
@@ -111,18 +100,16 @@ module.exports = {
111100
testNameSuffix: 'Test',
112101
testDir: 'tests/unit',
113102
sourceDir: 'src',
114-
arguments: [],
115-
testRunnerCommand: 'vendor/bin/phpunit',
103+
testRunnerCommand: { command: 'vendor/bin/phpunit', arguments: [] },
116104
},
117105
// Javascript unit test environment
118106
{
119107
extension: 'js',
120108
testNameSuffix: '.test',
121109
testDir: 'tests/unit',
122110
sourceDir: 'src',
123-
arguments: [],
124111
// If you are using mocha for your Javascript tests
125-
testRunnerCommand: 'node_modules/.bin/mocha',
112+
testRunnerCommand: { command: 'node_modules/.bin/mocha', arguments: [] },
126113
// You can define a custom command to run all tests (runs when you press "a" when Argus is running).
127114
// Otherwise Argus will use testRunnerCommand and its arguments to run all tests.
128115
runAllTestsCommand: { command: 'npm', arguments: ['t'] },

0 commit comments

Comments
 (0)