Skip to content

Commit

Permalink
add test for --only flag
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m authored and isaacs committed Jun 25, 2017
1 parent 7e42a08 commit 8438249
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/test/only--bail--buffer.tap
@@ -0,0 +1,11 @@
TAP version 13
ok 1 - normal ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - will log an error when run without TAP_ONLY=1
1..1
}

ok 2 - only # SKIP
1..2
# skip: 1
___/# time=[0-9.]+(ms)?/~~~

11 changes: 11 additions & 0 deletions test/test/only--bail.tap
@@ -0,0 +1,11 @@
TAP version 13
# Subtest: normal
ok 1 - will log an error when run without TAP_ONLY=1
1..1
ok 1 - normal ___/# time=[0-9.]+(ms)?/~~~

ok 2 - only # SKIP
1..2
# skip: 1
___/# time=[0-9.]+(ms)?/~~~

11 changes: 11 additions & 0 deletions test/test/only--buffer.tap
@@ -0,0 +1,11 @@
TAP version 13
ok 1 - normal ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - will log an error when run without TAP_ONLY=1
1..1
}

ok 2 - only # SKIP
1..2
# skip: 1
___/# time=[0-9.]+(ms)?/~~~

11 changes: 11 additions & 0 deletions test/test/only.js
@@ -0,0 +1,11 @@
var test = require('../..').test

test('normal', function (t) {
t.pass('will log an error when run without TAP_ONLY=1')
t.end()
})

test('only', {skip: true}, function (t) {
t.pass('ok')
t.end()
})
11 changes: 11 additions & 0 deletions test/test/only.tap
@@ -0,0 +1,11 @@
TAP version 13
# Subtest: normal
ok 1 - will log an error when run without TAP_ONLY=1
1..1
ok 1 - normal ___/# time=[0-9.]+(ms)?/~~~

ok 2 - only # SKIP
1..2
# skip: 1
___/# time=[0-9.]+(ms)?/~~~

0 comments on commit 8438249

Please sign in to comment.