Skip to content

Commit

Permalink
Run snapshots in -J mode, remove an extraneous test
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jan 21, 2019
1 parent 699b179 commit f61181a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 41 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -58,7 +58,7 @@
"repository": "https://github.com/tapjs/node-tap.git",
"scripts": {
"regen-fixtures": "node scripts/generate-test-test.js test-legacy/test/*.js",
"snap": "TAP_SNAPSHOT=1 node bin/run.js test/*.js",
"snap": "TAP_SNAPSHOT=1 node bin/run.js test/*.js -J",
"test": "node bin/run.js test/*.js --100 -J --nyc-arg=--include={lib,bin} -c",
"test-all": "node bin/run.js test/*.js test-legacy/*.js --100 -J --nyc-arg=--include={lib,bin} && npm run test-browser",
"test-browser": "node browser-test.js",
Expand Down
28 changes: 1 addition & 27 deletions tap-snapshots/test-tap.js-TAP.test.js
Expand Up @@ -404,8 +404,6 @@ ok 1 - fine
not ok 2 - timeout!
---
expired: TAP
handles:
- type: Timer
signal: SIGTERM
stack: |
{STACK}
Expand All @@ -432,8 +430,6 @@ ok 1 - fine
not ok 2 - timeout!
---
expired: TAP
handles:
- type: Timer
signal: SIGTERM
stack: |
{STACK}
Expand Down Expand Up @@ -461,7 +457,7 @@ not ok 2 - timeout!
---
expired: TAP
requests:
- type: FSReqWrap
- type: FSReqCallback
signal: SIGTERM
stack: |
{STACK}
Expand Down Expand Up @@ -511,25 +507,3 @@ tear it down
exports[`test/tap.js TAP autoend=false with teardown > stderr 1`] = `
`

exports[`test/tap.js TAP process.stdout and process.stderr are missing > exit status 1`] = `
{ code: 0, signal: null }
`

exports[`test/tap.js TAP process.stdout and process.stderr are missing > stdout 1`] = `
TAP version 13
ok 1 - stdout gets polyfilled
ok 2 - stderr gets polyfilled
1..2
# {time}
`

exports[`test/tap.js TAP process.stdout and process.stderr are missing > stderr 1`] = `
`
3 changes: 3 additions & 0 deletions test/clean-stacks.js
Expand Up @@ -25,6 +25,9 @@ module.exports = out => out
+ '\n' + $1 + '...\n'
})

// this key has changed names
.replace(/FSReqWrap/g, 'FSReqCallback')

// remove time details
.replace(/ # time=[0-9\.]+m?s( \{.*)?\n/g, ' # {time}$1\n')
.replace(/\n# time=.*/g, '\n# {time}')
Expand Down
13 changes: 0 additions & 13 deletions test/tap.js
Expand Up @@ -118,19 +118,6 @@ const cases = {
t.pass('this is fine')
t.end()
}, 50)
},
'process.stdout and process.stderr are missing': t => {
const stdout = process.stdout
const stderr = process.stderr
delete process.stdout
delete process.stderr
delete require.cache[require.resolve('..')]
require('..')
t.ok(process.stdout, 'stdout gets polyfilled')
t.ok(process.stderr, 'stderr gets polyfilled')
process.stdout = stdout
process.stderr = stderr
t.end()
}
}

Expand Down

0 comments on commit f61181a

Please sign in to comment.