Skip to content

Commit

Permalink
ci: fix windows path and rm codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
killagu committed Sep 20, 2024
1 parent 57fa1ca commit a0a7bc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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",
Expand Down
13 changes: 7 additions & 6 deletions test/utils.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

const path = require('path');
const utils = require('../common/utils');
const assert = require('assert');
const mm = require('mm');
Expand All @@ -12,47 +13,47 @@ 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', () => {
mm(os, 'homedir', () => {
return '/home/xxx';
});
const p = utils.getXprofilerPath();
assert.equal(p, '/home/xxx/.xprofiler');
assert.equal(p, path.normalize('/home/xxx/.xprofiler'));
});
});

describe('get xtransit path', () => {
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', () => {
mm(os, 'homedir', () => {
return '/home/xxx';
});
const p = utils.getXtransitPath();
assert.equal(p, '/home/xxx/.xtransit');
assert.equal(p, path.normalize('/home/xxx/.xtransit'));
});
});

describe('get xtransit log path', () => {
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', () => {
mm(os, 'homedir', () => {
return '/home/xxx';
});
const p = utils.getXtransitLogPath();
assert.equal(p, '/home/xxx/.xtransit.log');
assert.equal(p, path.normalize('/home/xxx/.xtransit.log'));
});
});
});

0 comments on commit a0a7bc8

Please sign in to comment.