Skip to content

Commit ceddec3

Browse files
committed
Fix unstable test for glob file match
use faker.system.commonFileName() instead of faker.word.words
1 parent 71b3603 commit ceddec3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/solutions/active-solution-tracker.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe('ActiveSolutionTracker', () => {
106106
});
107107

108108
it('uses the configured glob pattern for searches', async () => {
109-
const testGlobPattern = faker.word.words();
109+
const testGlobPattern = `**/${faker.system.commonFileName()}`;
110110
configurationProvider.getConfigVariable.mockImplementation((name: string) => name === manifest.CONFIG_EXCLUDE ? testGlobPattern : undefined);
111111

112112
await activeSolutionTracker.activate(context as unknown as vscode.ExtensionContext);
@@ -125,7 +125,7 @@ describe('ActiveSolutionTracker', () => {
125125
expect(configurationProvider.onChangeConfiguration).toHaveBeenCalledTimes(1);
126126
expect(configurationProvider.onChangeConfiguration).toHaveBeenCalledWith(expect.any(Function), manifest.CONFIG_EXCLUDE);
127127

128-
const testGlobPattern = faker.word.words();
128+
const testGlobPattern = `**/${faker.system.commonFileName()}`;
129129
configurationProvider.getConfigVariable.mockImplementation((name: string) => name === manifest.CONFIG_EXCLUDE ? testGlobPattern : undefined);
130130
configurationProvider.onChangeConfiguration.mock.calls[0][0]();
131131
await waitTimeout();

0 commit comments

Comments
 (0)