Skip to content

Commit 47f8045

Browse files
author
Kohei Asai
committed
Merge pull request axross#8 from miduga/master
Updating README.md
2 parents 7e8a04d + d5ea09f commit 47f8045

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

Diff for: README.md

+16-7
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,24 @@ tape ./*.test.js | tap-diff
2323
Or use with `createStream()`:
2424

2525
```javascript
26-
var test = require('tape');
27-
var tapDiff = require('tapDiff');
26+
'use strict'
2827

29-
test.createStream()
30-
.pipe(tapDiff());
28+
const test = require('tape')
29+
const tapDiff = require('tap-diff')
3130

32-
process.argv.slice(2).forEach(function (file) {
33-
require(path.resolve(file));
34-
});
31+
test.createStream()
32+
.pipe(tapDiff())
33+
.pipe(process.stdout)
34+
35+
test('timing test', (t) => {
36+
t.plan(2)
37+
t.equal(typeof Date.now, 'function')
38+
var start = Date.now()
39+
40+
setTimeout(() => {
41+
t.equal(Date.now() - start, 100)
42+
}, 100)
43+
})
3544
```
3645

3746
## License

0 commit comments

Comments
 (0)