Workaround for legacy newsletter editor tests after updating chai
Chain newly has to be imported as module and doesn't support CommonJs [MAILPOET-6008]
This commit is contained in:
committed by
Veljko V
parent
ca8f6c64d6
commit
73434e1ef7
@@ -371,6 +371,7 @@ class RoboFile extends \Robo\Tasks {
|
||||
$command = join(' ', [
|
||||
'./node_modules/.bin/mocha',
|
||||
'-r tests/javascript-newsletter-editor/mocha-test-helper.js',
|
||||
'-r tests/javascript-newsletter-editor/mocha-chai.mjs',
|
||||
'tests/javascript-newsletter-editor/testBundles/**/*.js',
|
||||
'--exit',
|
||||
]);
|
||||
|
@@ -0,0 +1,8 @@
|
||||
import * as chai from 'chai';
|
||||
import sinonChai from 'sinon-chai';
|
||||
import chaiJq from 'chai-jq';
|
||||
|
||||
chai.use(sinonChai);
|
||||
chai.use(chaiJq);
|
||||
|
||||
global.expect = chai.expect;
|
@@ -1,16 +1,9 @@
|
||||
var chai = require('chai');
|
||||
var sinon = require('sinon');
|
||||
var sinonChai = require('sinon-chai');
|
||||
var chaiJq = require('chai-jq');
|
||||
var _ = require('underscore');
|
||||
var { JSDOM } = require('jsdom');
|
||||
var URL = require('url').URL;
|
||||
var nodeCrypto = require('crypto');
|
||||
|
||||
chai.use(sinonChai);
|
||||
chai.use(chaiJq);
|
||||
|
||||
global.expect = chai.expect;
|
||||
global.sinon = sinon;
|
||||
global.URL = URL;
|
||||
|
||||
|
Reference in New Issue
Block a user