Skip to content

Commit

Permalink
Merge pull request #436 from ericmorand/issue_435
Browse files Browse the repository at this point in the history
Fix issue #435
  • Loading branch information
ericmorand committed Oct 15, 2019
2 parents add2b55 + 69927c3 commit b7f859a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- npm run test:docs
install:
- cd docs && bundle install --path ./vendor/bundle
- stage: test ESLint
- stage: test code quality
node_js: "12"
script:
- npm run test:eslint
- npm run test:qc
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"test:unit": "ts-node node_modules/tape/bin/tape 'test/tests/unit/**/test.ts' | tap-bail | tap-spec",
"test:browser": "rimraf test/tests/browser/dist && (tsc --project test/tests/browser && node test/tests/browser/dist/test/tests/browser/test.js) | browserify - | tape-run --render='tap-spec'",
"test:docs": "cd docs && bundle exec jekyll build",
"test:eslint": "ts-node node_modules/tape/bin/tape 'test/tests/eslint/**/test.ts' | tap-bail | tap-spec",
"test:qc": "ts-node node_modules/tape/bin/tape 'test/tests/qc/**/test.ts' | tap-bail | tap-spec",
"cover": "nyc npm run test",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"build": "npm run build:cjs && npm run build:es && npm run build:types",
Expand Down
16 changes: 0 additions & 16 deletions test/tests/eslint/test.ts

This file was deleted.

20 changes: 20 additions & 0 deletions test/tests/qc/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as tape from "tape";
import {resolve} from "path";

tape('code quality', (test) => {
test.test('linting', (test) => {
const {CLIEngine} = require("eslint");
const cli = new CLIEngine();
const report = cli.executeOnFiles([
resolve('src/**/*.ts'),
resolve('test/**/*.ts')
]);
const formatter = cli.getFormatter();

test.same(report.errorCount, 0, report.errorCount ? formatter(report.results) : 'linting should not report issues');

test.end();
});

test.end();
});

0 comments on commit b7f859a

Please sign in to comment.