Skip to content

Commit 12ae79a

Browse files
committed
update lint environment to recognize Mocha js and remove it & describe globals from tests
1 parent 2a25bdc commit 12ae79a

5 files changed

Lines changed: 4 additions & 12 deletions

File tree

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"prestart": "node ./db/prestart.js",
1111
"start": "node api.js",
1212
"watch": "supervisor -w api.js,server -- api.js",
13-
"lint": "./node_modules/standard/bin/cmd.js api.js server/**/*js test/**/*js db/**/*js",
13+
"lint": "./node_modules/standard/bin/cmd.js --env 'mocha' api.js server/**/*js test/**/*js db/**/*js",
1414
"fire-emergency-button": "./scripts/fire"
1515
},
1616
"repository": {
@@ -46,5 +46,8 @@
4646
"engines": {
4747
"node": "^4.2.1",
4848
"npm": "^2.14.7"
49+
},
50+
"standard": {
51+
"env": ["mocha"]
4952
}
5053
}

test/integration/things-place.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ const CONFIG = require('config')
22
const __ = CONFIG.universalPath
33
const _ = __.require('lib', 'utils')
44

5-
const it = global.it // for lint
6-
const describe = global.describe // for lint
75
require('should')
86

97
const breq = require('bluereq')

test/journal-model.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ const __ = CONFIG.universalPath
33
const _ = __.require('lib', 'utils')
44
require('should')
55

6-
const it = global.it // for lint
7-
const describe = global.describe // for lint
8-
96
const Journal = __.require('controllers', 'things/models/commons/journal')
107
const someJournalId = 'caa653ce22d3213f54338dd45300041c'
118

test/place-model.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ const __ = CONFIG.universalPath
33
const _ = __.require('lib', 'utils')
44
require('should')
55

6-
const it = global.it // for lint
7-
const describe = global.describe // for lint
8-
96
const Place = __.require('controllers', 'things/models/types/place')
107

118
describe('place model', function () {

test/version-model.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ const __ = CONFIG.universalPath
33
const _ = __.require('lib', 'utils')
44
require('should')
55

6-
const it = global.it // for lint
7-
const describe = global.describe // for lint
8-
96
const Version = __.require('controllers', 'things/models/commons/version')
107
const someJournalId = 'caa653ce22d3213f54338dd45300041c'
118

0 commit comments

Comments
 (0)