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

Add vitest layer api #3689

Merged
merged 6 commits into from
Sep 26, 2024
Merged

Add vitest layer api #3689

merged 6 commits into from
Sep 26, 2024

Conversation

tim-smart
Copy link
Member

@tim-smart tim-smart commented Sep 26, 2024

No description provided.

Copy link

changeset-bot bot commented Sep 26, 2024

🦋 Changeset detected

Latest commit: aa7d145

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@effect/vitest Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot changed the base branch from main to next-minor September 26, 2024 05:24
@tim-smart tim-smart changed the title vitest layer Add vitest layer api Sep 26, 2024
@jessekelly881
Copy link
Contributor

jessekelly881 commented Sep 26, 2024

What about

layer(Foo.Live)("test name", (it) => {})

const describe = layer(Foo.Live);
describe("test/a", (it) => {})

Using Vi.describe internally to group tests

@mikearnaldi
Copy link
Member

Was also wondering about how this can play with describe, could also be:

describe("...", layer, (it) => ...)

Also we should warm up the layer in a beforeAll to avoid randomly adding time to the first executed test

@tim-smart
Copy link
Member Author

Using Vi.describe internally to group tests

Added support for an optional name.

@mikearnaldi
Copy link
Member

Looks like in beforeAll / afterAll we are using promises that will throw FiberFailure that will be problematic in rendering of errors, we should use the same method we use for it.effect

@tim-smart tim-smart changed the base branch from next-minor to main September 26, 2024 22:41
@tim-smart tim-smart merged commit 4d91f41 into main Sep 26, 2024
11 checks passed
@tim-smart tim-smart deleted the vitest-layer branch September 26, 2024 23:40
@github-actions github-actions bot mentioned this pull request Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants