Merge pull request #2209 from rachel-fenichel/mocha_eslintrc

Add eslintrc to mocha directory
This commit is contained in:
Rachel Fenichel
2019-01-09 14:08:27 -08:00
committed by GitHub
6 changed files with 22 additions and 28 deletions

20
tests/mocha/.eslintrc Normal file
View File

@@ -0,0 +1,20 @@
{
"env": {
"browser": true,
"mocha": true
},
"globals": {
"chai": false,
"sinon": false,
"assertNull": true,
"assertNotNull": true,
"assertEquals": true,
"assertTrue": true,
"assertFalse": true,
"isEqualArrays": true,
"assertUndefined": true,
"assertNotUndefined": true
},
"extends": "eslint:recommended"
}

View File

@@ -1,10 +1,4 @@
// Declare some globals to make eslint happier.
// TODO: make an eslint config that applies to this directory and put this
// configuration in that file, instead of inline.
/* global suite, test, setup, teardown */
/* global assertNull, assertEquals */
suite('Blocks', function() {

View File

@@ -1,12 +1,4 @@
// Declare some globals to make eslint happier.
// TODO: make an eslint config that applies to this directory and put this
// configuration in that file, instead of inline.
/* global suite, test, setup, teardown */
/* global sinon */
/* global assertNotNull, assertNotUndefined, assertNull, assertEquals,
isEqualArrays, assertUndefined */
suite('Events', function() {
setup(function() {
this.workspace = new Blockly.Workspace();
@@ -39,7 +31,8 @@ suite('Events', function() {
function checkExactEventValues(event, values) {
var keys = Object.keys(values);
for (var i = 0, field; field = keys[i]; i++) {
for (var i = 0; i < keys.length; i++) {
var field = keys[i]
assertEquals(values[field], event[field]);
}
}

View File

@@ -1,11 +1,4 @@
// Declare some globals to make eslint happier.
// TODO: make an eslint config that applies to this directory and put this
// configuration in that file, instead of inline.
/* global suite, test, chai, setup, teardown */
/* global assertNull, assertEquals, isEqualArrays */
suite('Variable Fields', function() {
function getMockBlock(workspace) {
return {

View File

@@ -1,4 +1,3 @@
/* global chai */
/* exported assertEquals, assertTrue, assertFalse, assertNull, assertNotNull,
isEqualArrays, assertUndefined, assertNotUndefined */
function _argumentsIncludeComments(expectedNumberOfNonCommentArgs, args) {

View File

@@ -1,9 +1,4 @@
// Declare some globals to make eslint happier.
// TODO: make an eslint config that applies to this directory and put this
// configuration in that file, instead of inline.
/* global suite, test, chai, assertFalse, assertTrue, assertEquals */
suite('Utils', function() {
test('genUid', function() {
var uuids = {};