Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ vi.mock('../github/auth', async () => ({
}));

vi.mock('@octokit/rest', async () => ({
Octokit: vi.fn().mockImplementation(() => mockOctokit),
Octokit: vi.fn().mockImplementation(function () {
return mockOctokit;
}),
}));

// We've already mocked '../github/auth' above
Expand Down
4 changes: 3 additions & 1 deletion lambdas/functions/control-plane/src/pool/pool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const mockOctokit = {
};

vi.mock('@octokit/rest', () => ({
Octokit: vi.fn().mockImplementation(() => mockOctokit),
Octokit: vi.fn().mockImplementation(function () {
return mockOctokit;
}),
}));

vi.mock('./../aws/runners', async () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ const mockOctokit = {
};

vi.mock('@octokit/rest', async () => ({
Octokit: vi.fn().mockImplementation(() => mockOctokit),
Octokit: vi.fn().mockImplementation(function () {
return mockOctokit;
}),
}));
vi.mock('../github/octokit', async () => ({
getOctokit: vi.fn(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const mockOctokit = {
paginate: vi.fn(),
};
vi.mock('@octokit/rest', () => ({
Octokit: vi.fn().mockImplementation(() => mockOctokit),
Octokit: vi.fn().mockImplementation(function () {
return mockOctokit;
}),
}));

vi.mock('./../aws/runners', async (importOriginal) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ const mockSSMClient = mockClient(SSMClient);
const mockSSMgetParameter = vi.mocked(getParameter);

vi.mock('@octokit/rest', () => ({
Octokit: vi.fn().mockImplementation(() => mockOctokit),
Octokit: vi.fn().mockImplementation(function () {
return mockOctokit;
}),
}));

vi.mock('./../aws/runners', async () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const mockOctokit = {
},
};
vi.mock('@octokit/rest', async () => ({
Octokit: vi.fn().mockImplementation(() => mockOctokit),
Octokit: vi.fn().mockImplementation(function () {
return mockOctokit;
}),
}));

// mock stream for Axios
Expand Down
4 changes: 3 additions & 1 deletion lambdas/functions/webhook/src/sqs/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const mockSQS = {
}),
};
vi.mock('@aws-sdk/client-sqs', () => ({
SQS: vi.fn().mockImplementation(() => mockSQS),
SQS: vi.fn().mockImplementation(function () {
return mockSQS;
}),
}));
vi.mock('@aws-github-runner/aws-ssm-util');

Expand Down
1 change: 1 addition & 0 deletions lambdas/functions/webhook/syft-production.spdx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"spdxVersion":"SPDX-2.3","dataLicense":"CC0-1.0","SPDXID":"SPDXRef-DOCUMENT","name":".","documentNamespace":"https://anchore.com/syft/dir/a0d6bf47-eebe-4269-a613-c820fc9a36e8","creationInfo":{"licenseListVersion":"3.27","creators":["Organization: Anchore, Inc","Tool: syft-1.33.0"],"created":"2025-10-07T13:45:06Z"},"packages":[{"name":".","SPDXID":"SPDXRef-DocumentRoot-Directory-.","supplier":"NOASSERTION","downloadLocation":"NOASSERTION","filesAnalyzed":false,"licenseConcluded":"NOASSERTION","licenseDeclared":"NOASSERTION","copyrightText":"NOASSERTION","primaryPackagePurpose":"FILE"}],"relationships":[{"spdxElementId":"SPDXRef-DOCUMENT","relatedSpdxElement":"SPDXRef-DocumentRoot-Directory-.","relationshipType":"DESCRIBES"}]}
Comment thread
npalm marked this conversation as resolved.
Outdated
4 changes: 2 additions & 2 deletions lambdas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@typescript-eslint/eslint-plugin": "^8.46.0",
"@typescript-eslint/parser": "^8.46.1",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/coverage-v8": "^4.0.5",
"chalk": "^5.6.2",
"eslint": "^9.38.0",
"eslint-plugin-prettier": "5.5.4",
Expand All @@ -44,7 +44,7 @@
"ts-node-dev": "^2.0.0",
"typescript": "^5.9.3",
"vite": "^7.1.11",
"vitest": "^3.2.4"
"vitest": "^4.0.5"
},
"packageManager": "yarn@4.3.1"
}
Loading