Skip to content

Commit e9653f5

Browse files
committed
fix: getRandomPort
1 parent 6cf2f3e commit e9653f5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/cjs/index.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { fileURLToPath } from 'node:url';
33
import { expect, test } from '@playwright/test';
44
import { createRsbuild } from '@rsbuild/core';
55
import { pluginTailwindCSS } from '../../src';
6+
import { getRandomPort } from '../helper';
67

78
const __dirname = dirname(fileURLToPath(import.meta.url));
89

@@ -75,7 +76,7 @@ test('should build without tailwind.config.js', async ({ page }) => {
7576
cwd: __dirname,
7677
rsbuildConfig: {
7778
server: {
78-
port: Math.ceil(Math.random() * 30000) + 15000,
79+
port: getRandomPort(),
7980
},
8081
plugins: [pluginTailwindCSS()],
8182
},

0 commit comments

Comments
 (0)