Skip to content

Commit

Permalink
linagora/lgs/openpaas/linagora.esn.admin#248 workaround mockery issue…
Browse files Browse the repository at this point in the history
… while running midway tests

mfncooper/mockery#34
  • Loading branch information
kscc25 committed Oct 6, 2017
1 parent d65f4a3 commit 5aaaacd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/midway-backend/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ before(function(done) {
loader.load(MODULE_NAME, done);
});

// https://github.com/mfncooper/mockery/issues/34
before(function() {
require('canvas');
require('ursa');
});

after(function() {
try {
fs.unlinkSync(this.testEnv.tmp + '/default.json');
Expand All @@ -78,6 +72,10 @@ after(function() {
beforeEach(function() {
mockery.enable({warnOnReplace: false, warnOnUnregistered: false, useCleanCache: true});
this.testEnv.writeDBConfigFile();

// workaround https://github.com/mfncooper/mockery/issues/34
mockery.registerMock('canvas', {});
mockery.registerMock('ursa', {});
});

afterEach(function() {
Expand Down

0 comments on commit 5aaaacd

Please sign in to comment.