Skip to content

Commit c714895

Browse files
committed
Add shorter command line aliases, update readme
1 parent d73605f commit c714895

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@ Note that this harness requires the normalized test262 format currently proposed
1111
### Example
1212
Run chapter 8 tests:
1313

14-
`> node bin\run.js ../test262/test/suite/ch08/**/*.js`
14+
`> test262-harness ../test262/test/suite/ch08/**/*.js`
15+
`> test262-harness -e jsshell/js -p print ./tests`
16+
`> test262-harness --prelude promise.js ./tests/es6/ch25/**/*.js`
1517

1618
#### Options
1719
| Name | Action |
1820
|------------|---------------|
19-
| --runner | Selects a runner to use. Currently available are `node` and `console`
20-
| --consoleCommand | For console runner, sets the command to invoke. Must be in PATH.
21-
| --consolePrintCommand | For console runner, sets the command to write to console. Used for reporting errors to the harness.
21+
| -r, --runner | Selects a runner to use. Currently available are `node` and `console`
22+
| -e, --consoleCommand | For console runner, sets the command to invoke. Must be in PATH.
23+
| -p, --consolePrintCommand | For console runner, sets the command to write to console. Used for reporting errors to the harness.
24+
| -t, --threads | Run this many tests in parallel.
2225
| --testStrict | Tests both strict and non-strict mode (note: many tests need fixing for this to work)
23-
| --reporter | Selects test case result format. Currently either `json`, `tap`, or `simple`. Default `simple`.
26+
| -R, --reporter | Selects test case result format. Currently either `json`, `tap`, or `simple`. Default `simple`.
2427
| --prelude | Appends specified file to the top of each test file.
2528

2629
### Pipeline

bin/run.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,21 @@ var args = require('minimist')(process.argv.slice(2), {
1818
reporter: 'simple',
1919
threads: 1,
2020
consolePrintCommand: 'console.log'
21+
},
22+
alias: {
23+
consoleCommand: 'e',
24+
consolePrintCommand: 'p',
25+
runner: 'r',
26+
reporter: 'R',
27+
threads: 't',
2128
}
2229
});
2330

31+
// default to console runner if passing console command
32+
if(args.consoleCommand && args.runner === 'node') {
33+
args.runner = 'console';
34+
}
35+
2436
// Try to create our runner
2537
var Runner;
2638
try {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "test262-harness",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Node-based harness for test262",
55
"main": "index.js",
66
"bin": {

0 commit comments

Comments
 (0)