mirror of https://github.com/embarklabs/embark.git
style: make eslint aware of mocha globals in plugins/mocha-tests and stack/test-runner
Also remove some `/* globals ... */` comments and supply missing semicolons
This commit is contained in:
parent
5e8889f9de
commit
8779476ac0
|
@ -42,6 +42,9 @@
|
||||||
"test": "mocha dist/test/**/*.js"
|
"test": "mocha dist/test/**/*.js"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
|
"env": {
|
||||||
|
"mocha": true
|
||||||
|
},
|
||||||
"extends": "../../../.eslintrc.json"
|
"extends": "../../../.eslintrc.json"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/* globals describe, it */
|
|
||||||
const assert = require('assert').strict;
|
const assert = require('assert').strict;
|
||||||
const refute = require('refute')(assert);
|
const refute = require('refute')(assert);
|
||||||
const sinon = require('sinon');
|
const sinon = require('sinon');
|
||||||
|
|
|
@ -44,6 +44,9 @@
|
||||||
"test": "mocha dist/test/**/*.js"
|
"test": "mocha dist/test/**/*.js"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
|
"env": {
|
||||||
|
"mocha": true
|
||||||
|
},
|
||||||
"extends": "../../../.eslintrc.json"
|
"extends": "../../../.eslintrc.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/* globals describe, it */
|
|
||||||
const assert = require('assert').strict;
|
const assert = require('assert').strict;
|
||||||
const refute = require('refute')(assert);
|
const refute = require('refute')(assert);
|
||||||
const sinon = require('sinon');
|
const sinon = require('sinon');
|
||||||
|
@ -39,13 +38,13 @@ describe('Test Runner', () => {
|
||||||
instance.runners = [first, second];
|
instance.runners = [first, second];
|
||||||
instance.getFilesFromDir = (_, cb) => {
|
instance.getFilesFromDir = (_, cb) => {
|
||||||
cb(null, ['test/file_first.js', 'test/file_second.js']);
|
cb(null, ['test/file_first.js', 'test/file_second.js']);
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should warn when a file does not match any plugins', (done) => {
|
it('should warn when a file does not match any plugins', (done) => {
|
||||||
instance.getFilesFromDir = (_, cb) => {
|
instance.getFilesFromDir = (_, cb) => {
|
||||||
cb(null, ['luri.js']);
|
cb(null, ['luri.js']);
|
||||||
}
|
};
|
||||||
|
|
||||||
instance.run({}, (err) => {
|
instance.run({}, (err) => {
|
||||||
// Ensure no error was returned
|
// Ensure no error was returned
|
||||||
|
|
Loading…
Reference in New Issue