diff --git a/package.json b/package.json index cc9763b..d697cca 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "test-single": "mocha -t 0 -R spec", "cov": "nyc --reporter=html --reporter=text --reporter=lcov mocha -R spec test/*.test.js --timeout 0", "cov-single": "nyc --reporter=html --reporter=text --reporter=lcov mocha --timeout 0 -R spec", - "ci": "npm run lint && npm run cov && codecov", + "ci": "npm run lint && npm run cov", "release": "node scripts/release.js", "autod": "autod" }, @@ -55,7 +55,6 @@ }, "devDependencies": { "autod": "^3.1.0", - "codecov": "^3.7.2", "eslint": "^6.8.0", "eslint-config-egg": "^8.1.2", "expect.js": "^0.3.1", diff --git a/test/utils.test.js b/test/utils.test.js index 44f620c..9b45baf 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -1,5 +1,6 @@ 'use strict'; +const path = require('path'); const utils = require('../common/utils'); const assert = require('assert'); const mm = require('mm'); @@ -12,7 +13,7 @@ describe('utils.test.js', function() { it('should work with XPROFILER_PREFIX', () => { mm(process.env, 'XPROFILER_PREFIX', '/tmp'); const p = utils.getXprofilerPath(); - assert.equal(p, '/tmp/.xprofiler'); + assert.equal(p, path.normalize('/tmp/.xprofiler')); }); it('should work default is home', () => { @@ -20,7 +21,7 @@ describe('utils.test.js', function() { return '/home/xxx'; }); const p = utils.getXprofilerPath(); - assert.equal(p, '/home/xxx/.xprofiler'); + assert.equal(p, path.normalize('/home/xxx/.xprofiler')); }); }); @@ -28,7 +29,7 @@ describe('utils.test.js', function() { it('should work with XTRANSIT_PREFIX', () => { mm(process.env, 'XTRANSIT_PREFIX', '/tmp'); const p = utils.getXtransitPath(); - assert.equal(p, '/tmp/.xtransit'); + assert.equal(p, path.normalize('/tmp/.xtransit')); }); it('should work default is home', () => { @@ -36,7 +37,7 @@ describe('utils.test.js', function() { return '/home/xxx'; }); const p = utils.getXtransitPath(); - assert.equal(p, '/home/xxx/.xtransit'); + assert.equal(p, path.normalize('/home/xxx/.xtransit')); }); }); @@ -44,7 +45,7 @@ describe('utils.test.js', function() { it('should work with XTRANSIT_PREFIX', () => { mm(process.env, 'XTRANSIT_PREFIX', '/tmp'); const p = utils.getXtransitLogPath(); - assert.equal(p, '/tmp/.xtransit.log'); + assert.equal(p, path.normalize('/tmp/.xtransit.log')); }); it('should work default is home', () => { @@ -52,7 +53,7 @@ describe('utils.test.js', function() { return '/home/xxx'; }); const p = utils.getXtransitLogPath(); - assert.equal(p, '/home/xxx/.xtransit.log'); + assert.equal(p, path.normalize('/home/xxx/.xtransit.log')); }); }); });