Skip to content

Conversation

DylanPiercey
Copy link
Collaborator

@DylanPiercey DylanPiercey commented May 13, 2020

Description

Jest broke us jestjs/jest#10036. Specifically our reliance on the browser option jest used which allowed us to have a common preset which could target both server and browser compilations and module resolution.

The only way for us to support jest@26 and above is to split these into two presets and transformers.

The new top level api is:

preset: "@marko/jest/preset/browser"

for jsdom support and

preset: "@marko/jest/preset/node"

for testing server side components in the node environment.

Like wise the transform has been split into two and can be accessed via @marko/jest/transform/node and @marko/jest/transform/browser.

The default preset has been left in this release but now logs a warning if you are below jest 25 and throws is you are on jest 26.

Motivation and Context

Screenshots (if appropriate):

Checklist:

  • I have updated/added documentation affected by my changes.
  • I have added tests to cover my changes.

@DylanPiercey DylanPiercey merged commit 10c9f7a into master May 13, 2020
@DylanPiercey DylanPiercey deleted the jest-26-support branch May 14, 2020 15:41
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.

1 participant