Skip to content

Commit

Permalink
Resolve circular dep issue with t.mochaGlobals() function
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jul 21, 2020
1 parent 08b7268 commit 0e832e8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const tap = new TAP(opt)

module.exports = tap.default = tap.t = tap
tap.mocha = require('./mocha.js')
tap.mochaGlobals = tap.mocha.global
tap.mochaGlobals = () => tap.mocha.global()

tap.Test = Test
tap.Spawn = Spawn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`test/tap/plan-unsatisied.js TAP > exit status 1`] = `
exports[`test/tap/mocha-globals.js TAP > exit status 1`] = `
Object {
"code": 1,
"code": 0,
"signal": null,
}
`

exports[`test/tap/plan-unsatisied.js TAP > stderr 1`] = `
exports[`test/tap/mocha-globals.js TAP > stderr 1`] = `
`

exports[`test/tap/plan-unsatisied.js TAP > stdout 1`] = `
exports[`test/tap/mocha-globals.js TAP > stdout 1`] = `
TAP version 13
1..99
# test count(0) != plan(99)
# failed 1 test
ok 1 - should be equal
1..1
# {time}
`
4 changes: 4 additions & 0 deletions test/tap/mocha-globals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require('./')(t => {
t.mochaGlobals()
t.equal(typeof describe, 'function')
})
3 changes: 0 additions & 3 deletions test/tap/plan-unsatisied.js

This file was deleted.

0 comments on commit 0e832e8

Please # to comment.