Skip to content

Commit 7224b38

Browse files
authored
fix(image): failed in node16 CI environment (#7057)
1 parent 26d3a43 commit 7224b38

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/integration/image-component/tests/index.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from 'fs';
22
import path from 'path';
3+
import { isVersionAtLeast18 } from '@modern-js/utils';
34
import puppeteer from 'puppeteer';
45
import {
56
getPort,
@@ -22,6 +23,7 @@ function existsSync(filePath: string) {
2223

2324
describe('devtools build', () => {
2425
test(`should get right devtools build!`, async () => {
26+
if (!isVersionAtLeast18()) return;
2527
const buildRes = await modernBuild(appDir);
2628
expect(buildRes.code === 0).toBe(true);
2729
expect(existsSync('route.json')).toBe(true);
@@ -35,6 +37,7 @@ describe('devtools build', () => {
3537
});
3638

3739
it('should get image url with production CDN', async () => {
40+
if (!isVersionAtLeast18()) return;
3841
const appPort = await getPort();
3942
const app = await modernServe(appDir, appPort);
4043
const errors: string[] = [];
@@ -60,6 +63,7 @@ describe('devtools build', () => {
6063

6164
describe('devtools dev', () => {
6265
test(`should render page correctly`, async () => {
66+
if (!isVersionAtLeast18()) return;
6367
const appPort = await getPort();
6468
const app = await launchApp(
6569
appDir,

0 commit comments

Comments
 (0)