Skip to content

Commit dbd749f

Browse files
author
Josh Goldberg
authored
Removed end-to-end tests (#226)
1 parent c2e5d0d commit dbd749f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7
-1078
lines changed

.circleci/config.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979

8080
- run: npm run prettier
8181

82-
test-end-to-end:
82+
test:
8383
docker:
8484
- image: circleci/node:latest
8585

@@ -91,21 +91,7 @@ jobs:
9191
- attach_workspace:
9292
at: "."
9393

94-
- run: npm run test:end-to-end
95-
96-
test-unit:
97-
docker:
98-
- image: circleci/node:latest
99-
100-
working_directory: ~/repo
101-
102-
steps:
103-
- checkout
104-
105-
- attach_workspace:
106-
at: "."
107-
108-
- run: npm run test:unit -- --coverage
94+
- run: npm run test -- --coverage
10995

11096
tsc:
11197
docker:
@@ -143,11 +129,7 @@ workflows:
143129
- prettier:
144130
requires:
145131
- build
146-
- test-end-to-end:
147-
requires:
148-
- build
149-
- tsc
150-
- test-unit:
132+
- test:
151133
requires:
152134
- build
153135
- tsc:

docs/Development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ cd tslint-to-eslint-config
1717
npm i
1818
```
1919

20-
Compile with `npm run tsc` and run tests with `npm run test:unit`.
20+
Compile with `npm run tsc` and run tests with `npm run test`.
2121

2222
## Further Reading
2323

2424
- [Architecture](./Architecture.md): How the general app structure operates
2525
- [Dependencies](./Dependencies.md): How functions pass and receive static dependencies
26-
- [Testing](./Testing.md): Unit and end-to-end tests
26+
- [Testing](./Testing.md): Unit tests

docs/Testing.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# Testing
22

3-
## Unit Tests
4-
53
```
6-
npm run test:unit
4+
npm run test
75
```
86

97
Each `src/**/*.ts` source file should have an equivalent `*.test.ts` next to it.
@@ -21,26 +19,3 @@ Tests should include comments above each section of the "AAA" testing format:
2119

2220
See [Dependencies](./Dependencies.md) for how static dependencies are stubbed out in functions.
2321
That system is how functions can receive stubs and spies during unit tests.
24-
25-
## End-to-End Tests
26-
27-
```shell
28-
npm run test:end-to-end
29-
```
30-
31-
End-to-end tests that execute the `bin/tslint-to-eslint` command and validate outputs are generated from the directories in `test/tests/`.
32-
Each directory there contains:
33-
34-
- `test.ts`: Test file that runs `createTests(__dirname);` to set up tests in that directory
35-
- `.eslintrc.json`: `.gitignore`d output from the most recent test run
36-
- `expected.json`: Expected output ESLint configuration
37-
- `stderr.txt`: Expected output written to the process `stderr`
38-
- `stdout.txt`: Expected output written to the process `stdout`
39-
- `tslint.json`: Original TSLint configuration file to convert
40-
41-
Within each directory, a test suite will execute `bin/tslint-to-eslint` and validate the outputs match what's on disk.
42-
43-
Use `npm run test:end-to-end:accept` to overwrite the expected contents of files with what is actually written.
44-
These behave similarly to updating snapshots in snapshot testing.
45-
46-
> Note: these end-to-end tests use the compiled result of `npm run tsc`, so if you update source code, re-run `npm run tsc` before `npm run test:end-to-end`.

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@
6060
"eslint": "eslint \"./src/*.ts\" \"./src/**/*.ts\" --report-unused-disable-directives",
6161
"prettier": "prettier \"./src/*.{js,json,ts,xml,yaml}\" \"./src/**/*.{js,json,ts,xml,yaml}\" --ignore-path .prettierignore",
6262
"prettier:write": "npm run prettier -- --write",
63-
"test:unit": "jest",
64-
"test:end-to-end": "jest --config=test/jest.config.js --runInBand",
65-
"test:end-to-end:accept": "jest --config=test/jest.config.js --globals=\"{\\\"acceptTestChanges\\\": true }\" --runInBand",
63+
"test": "jest",
6664
"tsc": "tsc"
6765
},
6866
"version": "0.2.7"

test/createTestArgs.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

test/createTests.ts

Lines changed: 0 additions & 78 deletions
This file was deleted.

test/expectFileContains.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

test/jest.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/tests/custom eslint path/eslintrc.js

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)