Skip to content

Commit 362c935

Browse files
authored
Fix flaky test on site theming mcp tool (#222)
1 parent 0d2c12c commit 362c935

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/b2c-dx-mcp/test/tools/storefrontnext/site-theming/theming-store.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('tools/storefrontnext/site-theming/theming-store', () => {
2020
let originalThemingFiles: string | undefined;
2121

2222
beforeEach(() => {
23-
testDir = path.join(tmpdir(), `b2c-theming-store-test-${Date.now()}`);
23+
testDir = path.join(tmpdir(), `b2c-theming-store-test-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`);
2424
mkdirSync(testDir, {recursive: true});
2525
originalThemingFiles = process.env.THEMING_FILES;
2626
});
@@ -577,7 +577,7 @@ Follow user specs exactly.
577577

578578
it('should clear and re-load when root changes', () => {
579579
delete process.env.THEMING_FILES;
580-
const otherDir = path.join(tmpdir(), `b2c-theming-other-${Date.now()}`);
580+
const otherDir = path.join(tmpdir(), `b2c-theming-other-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`);
581581
mkdirSync(otherDir, {recursive: true});
582582
try {
583583
const customPath = path.join(testDir, 'first-root.md');

0 commit comments

Comments
 (0)