-
Notifications
You must be signed in to change notification settings - Fork 147
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
chore: run tests in isolation #332
Conversation
Looks good to me! |
@@ -0,0 +1,32 @@ | |||
--- | |||
title: 'foo' | |||
name: jeff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂
fn({ | ||
dir() { | ||
return tmpDir | ||
}, | ||
browser() { | ||
return browser | ||
}, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
👏 Very cool new testing pattern here.
Builds off of #331
Refactors integration tests to run against isolated fixtures. This is accomplished by copying the fixtures defined in
__tests__/fixtures
into tmp directories and doing a clean install of a locally packednext-mdx-remote
, along withnext
,react
, andreact-dom
. This ensures each test case is independently executed and by relying onnpm pack
we are testing against the eventually published artifact.We now expose a
createDescribe
test utility that handles creating an isolated directory from one of our fixtures:h/t to @timneutkens for pointing me at Next.js's testing approach, which this is inspired by 🙏