Skip to content

Commit f3b475b

Browse files
devinealongieirl
andauthored
fix unstable fiori tools settings test (#3864)
* fix unstable test * refactor: comment out fs existence check in writeApplicationInfoSettings test * refactor: clean up test setup by ensuring appInfo.json is deleted before each test * Feedback * cleanup --------- Co-authored-by: J Long <[email protected]>
1 parent e94df25 commit f3b475b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/fiori-tools-settings/test/applicationInfoHandler.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ import {
88
appInfoFilePath,
99
defaultAppInfoContents
1010
} from '../src';
11+
import { promises as fsPromises } from 'node:fs';
1112

1213
describe('Application Info Settings', () => {
1314
let fs: Editor;
1415

15-
beforeEach(() => {
16+
beforeEach(async () => {
17+
// Ensure a clean state before each test
18+
await fsPromises.rm(appInfoFilePath).catch(() => {
19+
// Ignore errors if the file does not exist
20+
});
21+
1622
fs = create(createStorage());
1723
});
1824

0 commit comments

Comments
 (0)