Skip to content
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

Update ts-migrate-server to pass back a list of migrated files #175

Conversation

NickHeiner
Copy link

Part of #168

@NickHeiner
Copy link
Author

Hmm – when I run yarn test locally, I get:

ts-migrate: PASS tests/commands/migrate/migrate.test.ts (10.485 s)

However, in the GH Actions output, I see:

ts-migrate: FAIL tests/commands/migrate/migrate.test.ts (6.248 s)

Curiously, it looks like the GH Action ran against the test file from main, not my PR:

ts-migrate:   ● migrate command › Migrates project
ts-migrate:     expect(received).toBe(expected) // Object.is equality
ts-migrate:     Expected: 0
ts-migrate:     Received: {"exitCode": 0, "updatedSourceFiles": Set {"/home/runner/work/ts-migrate/ts-migrate/packages/ts-migrate/tests/tmp/ts-migrate-bi79QG/Foo.tsx", "/home/runner/work/ts-migrate/ts-migrate/packages/ts-migrate/tests/tmp/ts-migrate-bi79QG/file-1.ts"}}
ts-migrate:       33 |     const [rootData, outputData] = getDirData(rootDir, outputDir);
ts-migrate:       34 |     expect(rootData).toEqual(outputData);
ts-migrate:     > 35 |     expect(exitCode).toBe(0);
ts-migrate:          |                      ^
ts-migrate:       36 |   }, 10000);
ts-migrate:       37 | });
ts-migrate:       38 |
ts-migrate:       at Object.<anonymous> (tests/commands/migrate/migrate.test.ts:35:22)

Have you seen something like this before? Maybe I'm missing something silly. I can investigate more later.

@Rudeg
Copy link
Contributor

Rudeg commented Sep 2, 2022

@NickHeiner Sorry for the delay!
You missed one test in the ts-migrate main package. Updated and will merge after the build :)

@Rudeg Rudeg merged commit 81ea387 into airbnb:master Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants