Skip to content

Commit 31776a3

Browse files
authored
chore: fix version check in tests (#414)
* chore: fix version check in tests * chore: correct logic for writing version
1 parent f47b5a5 commit 31776a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/integration/simple-app.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
startMockBlobStore,
2222
} from '../utils/helpers.js'
2323
import { getPatchesToApply } from '../../src/build/content/server.js'
24-
import { nextVersionSatisfies } from '../utils/next-version-helpers.mjs'
2524

2625
const mockedCp = cp as Mock<
2726
Parameters<(typeof import('node:fs/promises'))['cp']>,
@@ -218,7 +217,7 @@ test<FixtureTestContext>('rewrites to external addresses dont use compression',
218217
expect(gunzipSync(page.bodyBuffer).toString('utf-8')).toContain('<title>Example Domain</title>')
219218
})
220219

221-
test.skipIf(!nextVersionSatisfies('canary'))<FixtureTestContext>(
220+
test.skipIf(process.env.NEXT_VERSION !== 'canary')<FixtureTestContext>(
222221
'Test that a simple next app with PPR is working',
223222
async (ctx) => {
224223
await createFixture('ppr', ctx)

tests/utils/next-version-helpers.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export async function setNextVersionInFixture(
6767
// We can't use semver to check "canary" or "latest", so we use a fake future minor version
6868
const checkVersion = isSemverVersion ? version : FUTURE_NEXT_PATCH_VERSION
6969
if (
70+
operation === 'update' &&
7071
versionConstraint &&
7172
!satisfies(checkVersion, versionConstraint) &&
7273
version !== versionConstraint

0 commit comments

Comments
 (0)