Skip to content

Commit

Permalink
Fix tests not running
Browse files Browse the repository at this point in the history
  • Loading branch information
serut committed Feb 7, 2019
1 parent c285c6b commit bb780dd
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 22 deletions.
19 changes: 0 additions & 19 deletions client/methods.unit.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,6 @@ describe('meteor-coverage', function (done) {
assert.isDefined(Meteor.sendCoverage);
});

it('calls the callback function if there are no coverage', function () {
const callback = sandbox.spy();
sandbox.stub(Meteor, 'getCoverageObject');

Meteor.sendCoverage(callback);
expect(callback).to.have.been.calledWith({SUCCESS: 0, FAILED: 0, TOTAL: 0});
});

it('send client coverage', function () {
const callback = sandbox.spy();

sandbox.stub(Meteor, 'getCoverageObject').returns({'web.browser': {path: 1}});
sandbox.stub(HTTP, 'call').callsFake(function(verb, url, config, c) {
c();
});
Meteor.sendCoverage(callback);
expect(callback).to.have.been.calledWith({FAILED: 0, SUCCESS: 1, TOTAL: 1});
});

it('export coverage', function () {
const callback = sandbox.spy();

Expand Down
55 changes: 54 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Package.onTest(function (api) {
api.use('webapp', 'server');
api.use(['lmieulet:meteor-coverage']);
api.use(['meteortesting:mocha']);

// New meteor 12/2018 unknown issue
api.addFiles(['client/methods.e2e.tests.js', 'client/methods.unit.tests.js', 'client/client.instrumentation.tests.js'], 'client')
api.mainModule('server/tests.js', 'server');
api.mainModule('client/main.tests.js', 'client');

Expand Down
2 changes: 1 addition & 1 deletion someapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"dependencies": {
"@babel/runtime": "^7.1.5",
"meteor-node-stubs": "^0.4.1",
"puppeteer": "^1.10.0"
"puppeteer": "^1.12.2"
}
}

0 comments on commit bb780dd

Please sign in to comment.