Skip to content

Commit e2d8232

Browse files
Turn on linting (#116)
Enable linting, this fails on node 6 and 8 because ESLint uses newer syntax that they don't understand. This is fine as we are dropping support for those versions since they are well beyond EOL. Co-authored-by: Clay Jensen-Reimann <[email protected]>
1 parent 663b967 commit e2d8232

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ node_js:
33
- "6"
44
- "8"
55
- "10"
6-
script: npm test
6+
script: npm run ci
77
deploy:
88
provider: npm
99
email: $NPM_EMAIL

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "A JUnit reporter for mocha.",
55
"main": "index.js",
66
"scripts": {
7-
"lint": "./node_modules/.bin/eslint '*.js' 'test/**/*.js'; exit 0",
7+
"ci": "npm run lint && npm run test",
8+
"lint": "./node_modules/.bin/eslint '*.js' 'test/**/*.js'",
89
"test": "MOCHA_FILE=test/mocha.xml node_modules/.bin/mocha test --reporter=spec",
910
"tdd": "MOCHA_FILE=test/mocha.xml node_modules/.bin/mocha test --reporter=min --watch"
1011
},

test/mocha-junit-reporter-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ describe('mocha-junit-reporter', function() {
623623
it('generates Jenkins compatible classnames and suite name', function() {
624624
var reporter = configureReporter({jenkinsMode: true}, suites);
625625

626-
debug('testcase', reporter.suites[0].testsuite[1].testcase[0])
626+
debug('testcase', reporter.suites[0].testsuite[1].testcase[0]);
627627
expect(reporter.suites[0].testsuite[0]._attr.name).to.equal(suites[0].testsuite.title);
628628
expect(reporter.suites[0].testsuite[1].testcase[0]._attr.name).to.equal(suites[0].pass[0].title);
629629
expect(reporter.suites[0].testsuite[1].testcase[0]._attr.classname).to.equal(suites[0].testsuite.title);

0 commit comments

Comments
 (0)