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

Refactor all tests to use ESM and vitest #5698

Closed
2 of 9 tasks
danez opened this issue May 12, 2023 · 1 comment · Fixed by #5888
Closed
2 of 9 tasks

Refactor all tests to use ESM and vitest #5698

danez opened this issue May 12, 2023 · 1 comment · Fixed by #5888

Comments

@danez
Copy link
Contributor

danez commented May 12, 2023

We still have some tests that use ava and commonjs, we should refactor them to use vitest and ESM instead.

There is also a new fixture runner for tests which we can use, which can make the tests also faster. But can also be done afterwards.

Tasks

  1. automerge
    hereje
  2. automerge
    hereje
hereje added a commit to hereje/cli that referenced this issue Jul 22, 2023
refactor test file to ESM

- convert to ESM
- replace ava with vitest
- replace got with node-fetch

Related to: netlify#5698
hereje added a commit to hereje/cli that referenced this issue Jul 26, 2023
- convert file to ESM
- replace got with fetch in most of the test cases
- define environment prefix so that vitest can set environment variables
- move and rename file

Related to: netlify#5698
hereje added a commit to hereje/cli that referenced this issue Jul 26, 2023
- replace ava with vitest
- convert file to ESM
- move and rename file

Related to: netlify#5698
hereje added a commit to hereje/cli that referenced this issue Jul 26, 2023
- convert file to ESM
- replace ava with vitest
- replace got with node-fetch
- rename and move file

Related to: netlify#5698
lukasholzer pushed a commit that referenced this issue Jul 27, 2023
* refactor: tests/integration/20.command.functions.test.cjs

refactor test file to ESM

- convert to ESM
- replace ava with vitest
- replace got with node-fetch

Related to: #5698

* refactor: rename environment variable
hereje added a commit to hereje/cli that referenced this issue Jul 27, 2023
- convert file to ESM
- replace ava with vitest
- replace got with node-fetch
- rename and move file

Related to: netlify#5698
kodiakhq bot added a commit that referenced this issue Jul 28, 2023
* refactor: 130.eleventy.test.cjs

- convert file to ESM
- replace ava with vitest
- replace got with node-fetch
- rename and move file

Related to: #5698

* refactor: 130.eleventy.test.cjs

- convert file to ESM
- replace ava with vitest
- replace got with node-fetch
- rename and move file

Related to: #5698

* fix: update cwd path on startDevServer

* test: run tests concurrently

* test: remove skip on test with technical debt

- remove skip on test due to the fact that the issue
commented in technical debt is already solved

* fix: match with most of the original test headers

* style: headers reorganization

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
kodiakhq bot added a commit that referenced this issue Jul 28, 2023
- replace ava with vitest
- convert file to ESM
- move and rename file

Related to: #5698

Co-authored-by: Lukas Holzer <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
@kodiakhq kodiakhq bot closed this as completed in #5888 Aug 1, 2023
@hereje
Copy link
Contributor

hereje commented Aug 2, 2023

Remaining test files to be migrated:

@lukasholzer lukasholzer reopened this Aug 3, 2023
kodiakhq bot added a commit that referenced this issue Aug 3, 2023
* refactor: tests/integration/100.command.dev.test.cjs

- convert file to ESM
- replace got with fetch in most of the test cases
- define environment prefix so that vitest can set environment variables
- move and rename file

Related to: #5698

* refactor: rename file

* chore: remove unused env prefix no needed

- remove previously included configuration in vitest.config.ts

---------

Co-authored-by: Sarah Etter <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants