Skip to content

Commit

Permalink
(refactor): move lint -> fixtures/lint, and the test out
Browse files Browse the repository at this point in the history
- because everything other than the test was indeed a fixture, and it's
  better to properly specify those as such for clarity
  - and consistency with the other tests

(format): fix some linting issues in tsdx-lint.test.js
- it's now no longer ignored by the lint script (which ignores the
  whole directory due to the fixtures)
  • Loading branch information
agilgur5 committed Mar 27, 2020
1 parent 70c8c68 commit 944ab02
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"prepare": "tsc -p tsconfig.json",
"build": "tsc -p tsconfig.json",
"lint": "yarn build && yarn lint:post-build",
"lint:post-build": "node dist/index.js lint src test --ignore-pattern 'test/e2e/lint'",
"lint:post-build": "node dist/index.js lint src test --ignore-pattern 'test/e2e/fixtures/lint'",
"test": "yarn build && yarn test:post-build",
"test:post-build": "node dist/index.js test",
"start": "tsc -p tsconfig.json --watch",
Expand Down
1 change: 1 addition & 0 deletions test/e2e/fixtures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
- `build-default` focuses on our zero config defaults
- `build-invalid` lets us check what happens when we have invalid builds due to type errors
- `build-withTsconfig` lets us check that `tsconfig.json` options are correctly used
- `lint` lets us check that lint errors are correctly detected
File renamed without changes.
File renamed without changes.
10 changes: 3 additions & 7 deletions test/e2e/lint/tsdx-lint.test.js → test/e2e/tsdx-lint.test.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
/**
* @jest-environment node
*/
'use strict';

const shell = require('shelljs');
const util = require('../../utils/fixture');

const util = require('../utils/fixture');

shell.config.silent = true;

const testDir = 'e2e';
const stageName = 'stage-lint';

const lintDir = `test/${testDir}/lint`
const lintDir = `test/${testDir}/fixtures/lint`;

describe('tsdx lint', () => {
it('should fail to lint a ts file with errors', () => {
Expand Down

0 comments on commit 944ab02

Please sign in to comment.