Skip to content

Commit

Permalink
Preact: Fix E2E test
Browse files Browse the repository at this point in the history
Since v10.24.0, Preact pretends to be React version 18.3.1 instead of 17.0.2.
This change has caused an assertion failure in one of our E2E tests where
we have assumed to see React 17.0.2 printed in one of our stories.
  • Loading branch information
valentinpalkovic committed Sep 16, 2024
1 parent 8e9d63b commit 12f8029
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions code/e2e-tests/addon-docs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,7 @@ test.describe('addon-docs', () => {

// Arrange - Setup expectations
let expectedReactVersionRange = /^18/;
if (
templateName.includes('preact') ||
templateName.includes('react-webpack/17') ||
templateName.includes('react-vite/17')
) {
if (templateName.includes('react-webpack/17') || templateName.includes('react-vite/17')) {
expectedReactVersionRange = /^17/;
} else if (templateName.includes('react16')) {
expectedReactVersionRange = /^16/;
Expand Down

0 comments on commit 12f8029

Please sign in to comment.