Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
fix(tests): remove old code coverage tool (#173), r=@vbudhram
Browse files Browse the repository at this point in the history
Fixes #164
  • Loading branch information
vladikoff authored and vbudhram committed Feb 11, 2017
1 parent dd30b0e commit 84d6ca4
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 324 deletions.
412 changes: 125 additions & 287 deletions npm-shrinkwrap.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"restify": "4.1.1"
},
"devDependencies": {
"ass": "git://github.com/jrgm/ass.git#5be99ee7abc9fcf63f9ebcc37b151b9c822146d1",
"eslint-config-fxa": "2.1.0",
"grunt": "1.0.1",
"grunt-bump": "0.8.0",
Expand All @@ -49,6 +48,6 @@
"walk": "2.3.x"
},
"engines": {
"node": ">=0.10.0"
"node": ">=4.5.0"
}
}
35 changes: 7 additions & 28 deletions scripts/tap-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* eslint-disable no-console */
if (!process.env.NO_COVERAGE) {
var ass = require('ass').enable( {
exclude: [ '/test' ]
})
}

var path = require('path'),
spawn = require('child_process').spawn,
fs = require('fs')
spawn = require('child_process').spawn

var p = spawn(path.join(path.dirname(__dirname), 'node_modules', '.bin', 'tap'),
process.argv.slice(2), { stdio: 'inherit' })
var COVERAGE_ARGS = ['--coverage', '--cov']
if (process.env.NO_COVERAGE) {
COVERAGE_ARGS = []
}

p.on('close', function(code) {
if (!process.env.NO_COVERAGE) {
ass.report('json', function(err, r) {
console.log('code coverage:', r.percent + '%')
process.stdout.write('generating coverage.html: ')
var start = new Date()
ass.report('html', function(err, html) {
fs.writeFileSync(path.join(path.dirname(__dirname), 'coverage.html'),
html)
process.stdout.write('complete in ' +
((new Date() - start) / 1000.0).toFixed(1) + 's\n')
process.exit(code)
})
})
} else {
process.exit(code)
}
})
spawn(path.join(path.dirname(__dirname), 'node_modules', '.bin', 'tap'),
process.argv.slice(2).concat(COVERAGE_ARGS), { stdio: 'inherit', env: process.env })
1 change: 0 additions & 1 deletion test/customs_server_stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

require('ass')
require('../bin/customs_server')
1 change: 0 additions & 1 deletion test/local/ban_tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

require('ass')
var test = require('tap').test
var log = {
info: function () {},
Expand Down
1 change: 0 additions & 1 deletion test/local/email_record_tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

require('ass')
var test = require('tap').test
var emailRecord = require('../../lib/email_record')

Expand Down
1 change: 0 additions & 1 deletion test/local/ip_blocklist_tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

require('ass')
var fs = require('fs')
var Promise = require('bluebird')
var test = require('tap').test
Expand Down
1 change: 0 additions & 1 deletion test/local/ip_email_record_tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

require('ass')
var test = require('tap').test
var ipEmailRecord = require('../../lib/ip_email_record')

Expand Down
1 change: 0 additions & 1 deletion test/local/ip_record_tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

require('ass')
var test = require('tap').test
var ipRecord = require('../../lib/ip_record')

Expand Down
1 change: 0 additions & 1 deletion test/local/sms_record_tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

require('ass')
var test = require('tap').test
var smsRecord = require('../../lib/sms_record')

Expand Down

0 comments on commit 84d6ca4

Please sign in to comment.