Skip to content

Commit

Permalink
tests: check for global leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed May 8, 2015
1 parent d5f6c5e commit 74cca15
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"index.js"
],
"scripts": {
"test": "mocha --reporter spec --bail test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/"
"test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --trace-deprecation --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/"
}
}
3 changes: 3 additions & 0 deletions test/flowing.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ var getRawBody = require('../')

var defaultLimit = 1024 * 1024

// Add Promise to mocha's global list
global.Promise = global.Promise

describe('stream flowing', function () {
describe('when limit lower then length', function (done) {
it('should stop the steam flow', function (done) {
Expand Down
3 changes: 3 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ var file = path.join(__dirname, 'index.js')
var length = fs.statSync(file).size
var string = fs.readFileSync(file, 'utf8')

// Add Promise to mocha's global list
global.Promise = global.Promise

describe('Raw Body', function () {
it('should work without any options', function (done) {
getRawBody(createStream(), function (err, buf) {
Expand Down

0 comments on commit 74cca15

Please sign in to comment.