Skip to content

Commit 44726fa

Browse files
committed
fix
1 parent ba2131c commit 44726fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/prebundle.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { afterAll, beforeAll, describe, expect, it } from '@rstest/core';
1+
import { afterAll, beforeAll, describe, expect, it, rs } from '@rstest/core';
22
import { execFile } from 'node:child_process';
33
import { promises as fs, readdirSync } from 'node:fs';
44
import { join, relative, sep } from 'node:path';
@@ -19,11 +19,13 @@ const targetPackages: TargetPackage[] = [
1919
{
2020
name: 'chalk',
2121
verify: async (distPath: string) => {
22+
rs.stubEnv('FORCE_COLOR', '1');
2223
const mod = await loadBundledModule(distPath);
2324
const chalkInstance = mod.default ?? mod;
2425
const message = chalkInstance.hex('#00ff88')('prebundle-ready');
2526
expect(message).toContain('prebundle-ready');
2627
expect(message).toContain('\u001b[');
28+
rs.unstubAllEnvs();
2729
},
2830
},
2931
{

0 commit comments

Comments
 (0)