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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap e2e tests #23

Merged
merged 13 commits into from
Apr 16, 2023
Merged

Bootstrap e2e tests #23

merged 13 commits into from
Apr 16, 2023

Conversation

dan-lee
Copy link
Contributor

@dan-lee dan-lee commented Apr 13, 2023

This project still amazes me 馃ぉ

I think tests are a crucial part of any project, so I added a basic smoke e2e test to build upon.
Bootstrapping was the most challenging part, so I hope this can pave the way for more in-depth tests.

What does it do?

It opens a tsserver instance in the project that should be tested and opens/saves a file and checks if the generated file was created and imported.

How to run

It can be run via pnpm test:e2e, everything else should be done automatically.
Be aware that the test takes some time (because of tsserver), around ~5 secs on my M1 machine for this test alone.

Any feedback is greatly appreciated

Addresses issue #22

test/e2e/fixture-project/package.json Outdated Show resolved Hide resolved
test/e2e/smoke.test.ts Show resolved Hide resolved
test/e2e/server.ts Show resolved Hide resolved
test/e2e/fixture-project/package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@dan-lee dan-lee force-pushed the chore/add-e2e-tests branch 2 times, most recently from 314e7aa to 6d2bf86 Compare April 15, 2023 10:05
@JoviDeCroock
Copy link
Member

Updated to a monorepo in #33 as this PR broke changesets and publishing in general

@dan-lee
Copy link
Contributor Author

dan-lee commented Apr 16, 2023

Rebased! Should I add it to the Github Action?

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
scripts/build.mjs Outdated Show resolved Hide resolved
@dan-lee
Copy link
Contributor Author

dan-lee commented Apr 16, 2023

@JoviDeCroock should be good to merge now 馃コ

.npmrc Outdated Show resolved Hide resolved
@JoviDeCroock JoviDeCroock merged commit 2a89522 into 0no-co:main Apr 16, 2023
@dan-lee dan-lee deleted the chore/add-e2e-tests branch April 16, 2023 14:35
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.

None yet

2 participants