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

test: convert some packages unit and e2e tests to vitest #6584

Merged
merged 1 commit into from
Oct 22, 2024
Merged

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Oct 22, 2024

  • converts lib unit and e2e to vitest.
  • converts package unit and e2e to vitest for packages starting with letters A-E.

Testing

running the tests

@kuhe kuhe requested a review from a team as a code owner October 22, 2024 18:47
@kuhe kuhe changed the title test: convert some packages unit tests to vitest test: convert some packages unit and e2e tests to vitest Oct 22, 2024
@@ -34,8 +35,7 @@ class AnyCommand extends DynamoDBDocumentClientCommand<{}, {}, {}, {}, {}> {
}

describe("DynamoDBDocumentClientCommand", () => {
// ToDo: Investigate why Jest29 throws TypeError: Class constructor Command cannot be invoked without 'new'
it.skip("should not allow usage of the default middlewareStack", () => {
it("should not allow usage of the default middlewareStack", () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

one benefit shown here, it works around certain Jest problems

],
environment: "node",
},
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This config file explicitly lists out packages because not all .spec.ts files are vitest compatible.

In CI, test:unit is run by turbo, so this file is not used, and does not need to be maintained. When conversion is complete, the inclusion will be wild-card based instead of curated, and only used if a developer wishes to run npx vite run etc. from the root.

include: ["lib/lib-dynamodb/**/*.e2e.spec.{ts,js}", "lib/lib-storage/**/*.e2e.spec.{ts,js}"],
environment: "node",
},
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not part of CI. It is a temporary local-dev file for running vitest e2e tests from the application root.

@kuhe kuhe merged commit 3435c99 into aws:main Oct 22, 2024
4 checks passed
@kuhe kuhe deleted the vitest3 branch October 22, 2024 21:40
Copy link

github-actions bot commented Nov 6, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants