From 74eee6d143cb92d0dbb09ecec837eb0d6d403b7e Mon Sep 17 00:00:00 2001 From: Kamil Wolny Date: Thu, 28 Jul 2022 17:55:51 +0100 Subject: [PATCH] feat: clean up unused files Signed-off-by: Kamil Wolny --- plugins/github-issues/dev/index.tsx | 27 ---------- .../GitHubIssues/GitHubIssues.test.tsx | 49 ------------------- 2 files changed, 76 deletions(-) delete mode 100644 plugins/github-issues/dev/index.tsx delete mode 100644 plugins/github-issues/src/components/GitHubIssues/GitHubIssues.test.tsx diff --git a/plugins/github-issues/dev/index.tsx b/plugins/github-issues/dev/index.tsx deleted file mode 100644 index 4de5a78b2f..0000000000 --- a/plugins/github-issues/dev/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2022 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import { createDevApp } from '@backstage/dev-utils'; -import { gitHubIssuesPlugin, GitHubIssuesPage } from '../src/plugin'; - -createDevApp() - .registerPlugin(gitHubIssuesPlugin) - .addPage({ - element: , - title: 'Root Page', - path: '/github-issues', - }) - .render(); diff --git a/plugins/github-issues/src/components/GitHubIssues/GitHubIssues.test.tsx b/plugins/github-issues/src/components/GitHubIssues/GitHubIssues.test.tsx deleted file mode 100644 index ebb9c78f19..0000000000 --- a/plugins/github-issues/src/components/GitHubIssues/GitHubIssues.test.tsx +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import { GitHubIssues } from './GitHubIssues'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; -import { rest } from 'msw'; -import { setupServer } from 'msw/node'; -import { - setupRequestMockHandlers, - renderInTestApp, -} from '@backstage/test-utils'; - -// test for repo duplicates - -describe('GitHubIssues', () => { - const server = setupServer(); - // Enable sane handlers for network requests - setupRequestMockHandlers(server); - - // setup mock response - beforeEach(() => { - server.use( - rest.get('/*', (_, res, ctx) => res(ctx.status(200), ctx.json({}))), - ); - }); - - it('should render', async () => { - const rendered = await renderInTestApp( - - - , - ); - expect(rendered.getByText('Welcome to github-issues!')).toBeInTheDocument(); - }); -});