diff --git a/plugins/github-issues/package.json b/plugins/github-issues/package.json index 21693740c7..d31bb52603 100644 --- a/plugins/github-issues/package.json +++ b/plugins/github-issues/package.json @@ -44,7 +44,6 @@ "@backstage/core-app-api": "^1.0.5-next.0", "@backstage/dev-utils": "^1.0.5-next.1", "@backstage/test-utils": "^1.1.3-next.0", - "@faker-js/faker": "^7.4.0", "@spotify/prettier-config": "^14.0.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", diff --git a/plugins/github-issues/src/components/GitHubIssues/GitHubIssues.test.tsx b/plugins/github-issues/src/components/GitHubIssues/GitHubIssues.test.tsx index c8486d3d70..33eec79359 100644 --- a/plugins/github-issues/src/components/GitHubIssues/GitHubIssues.test.tsx +++ b/plugins/github-issues/src/components/GitHubIssues/GitHubIssues.test.tsx @@ -20,43 +20,41 @@ import { catalogApiRef, CatalogApi, } from '@backstage/plugin-catalog-react'; -import { faker } from '@faker-js/faker'; import { Entity } from '@backstage/catalog-model'; import { GitHubIssuesApi, gitHubIssuesApiRef, Issue } from '../../api'; import { GitHubIssues } from './GitHubIssues'; -const generateTestIssue = ( - overwrites: Partial = {}, -): { node: Issue } => ({ +const getTestIssue = (overwrites: Partial = {}): { node: Issue } => ({ node: { ...{ assignees: { edges: [ { node: { - avatarUrl: faker.internet.avatar(), - login: `${faker.word.adjective()}-${faker.animal.type()}`, + avatarUrl: + 'https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/1112.jpg', + login: 'worthless-horse', }, }, ], }, author: { - login: `${faker.word.adjective()}-${faker.animal.type()}`, + login: 'next-dog', }, repository: { - nameWithOwner: `${faker.animal.type()}/${faker.animal.type()}`, + nameWithOwner: 'backstage/backstage', }, - title: faker.lorem.words(3), - url: faker.internet.url(), + title: 'quasi labore qui', + url: 'http://flowery-muscatel.net', participants: { - totalCount: +faker.random.numeric(), + totalCount: 3, }, - updatedAt: faker.date.past().toISOString(), - createdAt: faker.date.past().toISOString(), + updatedAt: '2022-05-02T09:46:35.885Z', + createdAt: '2022-06-03T07:11:22.320Z', comments: { - totalCount: +faker.random.numeric(), + totalCount: 6, }, }, ...overwrites, @@ -114,7 +112,7 @@ describe('GitHubIssues', () => { }); it('should render correctly', async () => { - const testIssue = generateTestIssue({ + const testIssue = getTestIssue({ createdAt: '2020-04-19T10:15:47.614Z', updatedAt: '2020-04-20T00:15:47.614Z', }); diff --git a/yarn.lock b/yarn.lock index 4bebec76e1..4894a4b674 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2673,11 +2673,6 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@faker-js/faker@^7.4.0": - version "7.4.0" - resolved "https://registry.npmjs.org/@faker-js/faker/-/faker-7.4.0.tgz#cac720d860a89d487b47e55e66a4fd114f1d3fe5" - integrity sha512-xDd3Tvkt2jgkx1LkuwwxpNBy/Oe+LkZBTwkgEFTiWpVSZgQ5sc/LenbHKRHbFl0dq/KFeeq/szyyPtpJRKY0fg== - "@fmvilas/pseudo-yaml-ast@^0.3.1": version "0.3.1" resolved "https://registry.npmjs.org/@fmvilas/pseudo-yaml-ast/-/pseudo-yaml-ast-0.3.1.tgz#66c5df2c2d76ba8571dc5bd98fda4d7dce6121de"