Skip to content

Commit

Permalink
fix: dont auto require egg-mock (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored Jan 11, 2023
1 parent 1bfa7fb commit e703507
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"ypkgfiles": "^1.6.0"
},
"peerDependencies": {
"egg-mock": "^5.8.2"
"egg-mock": "^5.8.3"
},
"peerDependenciesMeta": {
"egg-mock": {
Expand All @@ -52,7 +52,7 @@
"coffee": "^5.4.0",
"cross-env": "^3.1.3",
"egg": "^3.9.1",
"egg-mock": "^5.8.2",
"egg-mock": "^5.8.3",
"enzyme": "^2.0.0",
"esbuild-register": "^2.5.0",
"eslint": "^8.16.0",
Expand Down
12 changes: 12 additions & 0 deletions test/lib/cmd/cov.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,18 @@ describe('test/lib/cmd/cov.test.js', () => {
.end();
});

it('test parallel', () => {
mm(process.env, 'TESTS', 'test/**/*.test.js');
return coffee.fork(eggBin, [ 'cov', '--parallel' ], {
cwd: path.join(__dirname, '../../fixtures/test-demo-app'),
})
.debug()
.expect('stdout', /should work/)
.expect('stdout', /a\.test\.js/)
.expect('code', 0)
.end();
});

it('env should work', async () => {
mm(process.env, 'TESTS', 'test/**/*.test.js');
return coffee.fork(eggBin, [ 'cov', '--parallel' ], {
Expand Down
2 changes: 0 additions & 2 deletions test/lib/cmd/test.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ describe('test/lib/cmd/test.test.js', () => {
});
});

// fail on github action ubuntu
it('test parallel', () => {
if (process.platform !== 'darwin') return;
mm(process.env, 'TESTS', 'test/**/*.test.js');
return coffee.fork(eggBin, [ 'test', '--parallel' ], {
cwd: path.join(__dirname, '../../fixtures/test-demo-app'),
Expand Down

0 comments on commit e703507

Please sign in to comment.