Skip to content

Commit

Permalink
Merge pull request #195 from snyk-tech-services/develop
Browse files Browse the repository at this point in the history
feat: merge develop to main
  • Loading branch information
stefanbuck-snyk authored Apr 3, 2024
2 parents 74c6081 + 53cff4a commit 8d86f80
Show file tree
Hide file tree
Showing 8 changed files with 1,090 additions and 1,084 deletions.
2 changes: 1 addition & 1 deletion .clabot
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"contributors": ["aarlaud","punkle", "nicolasarnold12321","snyk-bot","erikvanbrakel","lili2311","silthus","nnillni","roshick"]
"contributors": ["aarlaud","punkle", "nicolasarnold12321","snyk-bot","erikvanbrakel","lili2311","silthus","nnillni","roshick","SnykOleg","stefanbuck-snyk"]
}
2 changes: 1 addition & 1 deletion backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.22.2"
"version": "1.25.0"
}
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
},
"scripts": {
"build": "yarn tsc",
"test": "snyk test"
"test": "backstage-cli test"
},
"dependencies": {
"@backstage/catalog-model": "^1.4.3",
"@backstage/core-components": "^0.13.10",
"@backstage/core-plugin-api": "^1.8.2",
"@backstage/plugin-catalog-react": "^1.9.3",
"@backstage/catalog-model": "^1.4.5",
"@backstage/core-components": "^0.14.3",
"@backstage/core-plugin-api": "^1.9.1",
"@backstage/plugin-catalog-react": "^1.11.2",
"@material-ui/icons": "4.11.3",
"@material-ui/lab": "4.0.0-alpha.61",
"@snyk/dep-graph": "2.8.1",
Expand All @@ -25,8 +25,9 @@
"react-use": "^17.4.0"
},
"devDependencies": {
"@backstage/cli": "^0.25.1",
"@backstage/dev-utils": "^1.0.26",
"@backstage/cli": "^0.26.2",
"@backstage/dev-utils": "^1.0.30",
"@backstage/test-utils": "^1.5.3",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.2.0",
"@testing-library/user-event": "^14.5.1",
Expand Down
21 changes: 21 additions & 0 deletions src/api/SnykApiClient.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { SnykApiClient } from './index';
import {MockConfigApi, MockFetchApi} from "@backstage/test-utils";
import { UrlPatternDiscovery } from '@backstage/core-app-api';

const EXAMPLE_ORG_ID = '361fd3c0-41d4-4ea4-ba77-09bb17890967';

describe('SnykApiClient', () => {
const mockBaseUrl = 'http://localhost:3000';
const configApi = new MockConfigApi({ 'snyk.mocked': false });
const discoveryApi = UrlPatternDiscovery.compile(mockBaseUrl);
const fetchApi = new MockFetchApi({});
const snykApiClient = new SnykApiClient({ discoveryApi, configApi, fetchApi });
describe('getCompleteProjectsListFromAnnotations', () => {
describe('when there are no annotations', () => {
it('should return an empty array', async () => {
const result = await snykApiClient.getCompleteProjectsListFromAnnotations(EXAMPLE_ORG_ID, {});
expect(result).toEqual([]);
});
});
});
});
Loading

0 comments on commit 8d86f80

Please sign in to comment.