Skip to content

Migrate to vitest#62

Open
bluwy wants to merge 2 commits into
mainfrom
vitest
Open

Migrate to vitest#62
bluwy wants to merge 2 commits into
mainfrom
vitest

Conversation

@bluwy
Copy link
Copy Markdown
Member

@bluwy bluwy commented May 18, 2026

No idea if this works. It's quite hard to run the tests.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 18, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedvitest@​4.1.5961007999100

View full report

@ocavue ocavue mentioned this pull request May 18, 2026
@Andarist
Copy link
Copy Markdown
Member

It's quite hard to run the tests.

You have to configure the github token to run them. I run them OK in the past locally but lately I just relied on the CI - cause I didn't want to create a fresh token ;p

Comment thread tests/integration/env.ts
export const ROOT_TEST_BRANCH_PREFIX = global.ROOT_TEST_BRANCH_PREFIX;
export const ROOT_TEMP_DIRECTORY = global.ROOT_TEMP_DIRECTORY;
export const ROOT_TEST_BRANCH_PREFIX = process.env
.ROOT_TEST_BRANCH_PREFIX as string;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: i'd prefer the more narrowly-scoped cast in such case:

Suggested change
.ROOT_TEST_BRANCH_PREFIX as string;
.ROOT_TEST_BRANCH_PREFIX!;

Comment thread tests/integration/env.ts
.ROOT_TEST_BRANCH_PREFIX as string;
export const ROOT_TEMP_DIRECTORY = process.env.ROOT_TEMP_DIRECTORY as string;

configDotenv();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It feels weird/wrong that this comes after unpacking the variables from process.env

Comment thread package.json
"format:fix": "prettier --write \"**/*.{ts,tsx,md}\"",
"lint": "eslint . --max-warnings 0",
"test:integration": "jest --config jest.integration.config.cjs"
"test:integration": "vitest -c vitest.integration.config.ts"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we even have any other tests? it feels like this is just the default test suite here and we perhaps don't need to nest/namespace it under integration name

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