Skip to content

Conversation

@odzhychko
Copy link
Contributor

@odzhychko odzhychko commented Feb 20, 2025

The test were migrated by:

  1. running npx jest-codemod
  2. running npx codemod jest-to-vitest
  3. replacing calls to pending
  4. replacing fail with assert.fail

Resolves #905

The existing tests had ESLint problems.
So I was not sure how you handle such problems in tests.
Therefore, I also didn't fix ESLint problems introduced by the migrations.
Most of the new problems are in regard to style.
All of them can be automatically fixed by running npx eslint test/unit --fix.

odzhychko and others added 3 commits February 20, 2025 14:51
The test were migrated by:
  1. running `npx jest-codemod`
  2. running `npx codemod jest-to-vitest`
  3. replacing calls to `pending`
  4. replacing `fail` with `assert.fail`

Resolves #902

Signed-off-by: Oleksandr Dzhychko <[email protected]>
Signed-off-by: Richard Steinmetz <[email protected]>
Signed-off-by: Richard Steinmetz <[email protected]>
Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I tweaked a couple of small things.

For the archives: Unfortunately, we can't use jsdom here, as the tests use the document.evaluate() API which is not (yet) supported by jsdom. So we have to start a full, headless browser using Playwright.

@st3iny st3iny added 4. to release Ready to be released and/or waiting for tests to finish technical debt labels Mar 22, 2025
@st3iny st3iny merged commit 9e10ac2 into nextcloud:main Mar 22, 2025
8 checks passed
@odzhychko
Copy link
Contributor Author

Great, glad I could help. Thanks for developing and providing this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate tests from karma + jasmine to jest (or vitest) and get rid of webpack

2 participants