Skip to content

Commit

Permalink
Attempt to use power-assert.
Browse files Browse the repository at this point in the history
Throws the same error that it has thrown:

```
not ok 3 - "modeSwitchCapturesLogs" - test #3 in `lib/log.test.js`
  ---
  message: assert._capt is not a function
  stacktrace: TypeError: assert._capt is not a function
    at [object Object].module.exports.modeSwitchCapturesLogs (lib/log.test.js:26:18)
    at /Users/justin/code/testdouble/scripty/node_modules/teenytest/lib/user-function-async-wrapper-factory.js:10:22
    at /Users/justin/code/testdouble/scripty/node_modules/teenytest/node_modules/async/lib/async.js:718:13
    at Immediate.iterate [as _onImmediate] (/Users/justin/code/testdouble/scripty/node_modules/teenytest/node_modules/async/lib/async.js:262:13)
    at processImmediate [as _immediateCallback] (timers.js:374:17)
  ...
```

My `npm version`:

```
{ scripty: '1.2.2',
  npm: '2.14.4',
  ares: '1.10.1-DEV',
  http_parser: '2.5.0',
  modules: '46',
  node: '4.1.1',
  openssl: '1.0.2d',
  uv: '1.7.4',
  v8: '4.5.103.33',
  zlib: '1.2.8' }
```
  • Loading branch information
searls committed Apr 16, 2016
1 parent 67d303b commit 7ab154e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
},
"homepage": "https://github.com/testdouble/scripty#readme",
"devDependencies": {
"assert": "^1.3.0",
"espower": "power-assert-js/espower#embedded-recorder",
"espower-loader": "^1.0.0",
"intercept-stdout": "^0.1.2",
"mkdirp": "^0.5.1",
"power-assert": "^1.3.1",
"rimraf": "^2.5.2",
"semver": "^5.1.0",
"standard": "^6.0.8",
Expand Down
7 changes: 6 additions & 1 deletion test/safe-helper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
require('espower-loader')({
cwd: process.cwd(),
pattern: 'test/safe/**/*.js'
})

var decorateAssertions = require('./decorate-assertions')
global.assert = decorateAssertions(require('assert'))
global.assert = decorateAssertions(require('power-assert'))

var log = require('../lib/log')

Expand Down
7 changes: 6 additions & 1 deletion test/unit-helper.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
require('espower-loader')({
cwd: process.cwd(),
pattern: 'lib/**/*.test.js'
})

global.td = require('testdouble')

var decorateAssertions = require('./decorate-assertions')
global.assert = decorateAssertions(require('assert'))
global.assert = decorateAssertions(require('power-assert'))

var log = require('../lib/log')

Expand Down

0 comments on commit 7ab154e

Please sign in to comment.