Skip to content

Added end-to-end tests back to CircleCI flow #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ jobs:
- attach_workspace:
at: "."

- run: npm i -g ts-node
- run: npm run test:end-to-end

test-unit:
Expand Down Expand Up @@ -144,6 +143,10 @@ workflows:
- prettier:
requires:
- build
- test-end-to-end:
requires:
- build
- tsc
- test-unit:
requires:
- build
Expand Down
2 changes: 2 additions & 0 deletions docs/Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ Within each directory, a test suite will execute `bin/tslint-to-eslint` and vali

Use `npm run test:end-to-end:accept` to overwrite the expected contents of files with what is actually written.
These behave similarly to updating snapshots in snapshot testing.

> 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`.
2 changes: 1 addition & 1 deletion test/createTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const createTests = (

const act = async (testArgs: string[]) => {
try {
return await exec(`ts-node ${binFile} ${testArgs.join(" ")}`, {
return await exec(`node ${binFile} ${testArgs.join(" ")}`, {
cwd,
});
} catch (error) {
Expand Down