From 9ad3ba6011dbd93ff915f20c8a02bbee75e3a5be Mon Sep 17 00:00:00 2001 From: sblausten Date: Wed, 5 Jun 2024 19:11:08 +0200 Subject: [PATCH] Update test mocks Signed-off-by: sblausten --- .../src/analyzers/GithubLocationAnalyzer.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.test.ts b/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.test.ts index b745dd37ba..8fcffd1a33 100644 --- a/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.test.ts +++ b/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.test.ts @@ -112,7 +112,7 @@ describe('GithubLocationAnalyzer', () => { it('should analyze', async () => { octokit.search.code.mockImplementation((opts: { q: string }) => { - if (opts.q === 'filename:catalog-info.yaml repo:foo/bar') { + if (opts.q === 'filename:catalog-info.yaml extension:yaml repo:foo/bar') { return Promise.resolve({ data: { items: [{ path: 'catalog-info.yaml' }], total_count: 1 }, }); @@ -139,7 +139,7 @@ describe('GithubLocationAnalyzer', () => { it('should use the provided entity filename for search', async () => { octokit.search.code.mockImplementation((opts: { q: string }) => { - if (opts.q === 'filename:anvil.yaml repo:foo/bar') { + if (opts.q === 'filename:anvil.yaml extension:yaml repo:foo/bar') { return Promise.resolve({ data: { items: [{ path: 'anvil.yaml' }], total_count: 1 }, });