From 926e7043642a1dad86ee1a70b548565321c9fddd Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 24 Jun 2021 16:51:10 +0200 Subject: [PATCH] remove index tests Signed-off-by: Patrik Oldsberg --- packages/core-app-api/src/index.test.ts | 57 ----------------- packages/core-plugin-api/src/index.test.ts | 74 ---------------------- plugins/todo-backend/src/index.test.ts | 28 -------- plugins/todo/src/index.test.ts | 27 -------- 4 files changed, 186 deletions(-) delete mode 100644 packages/core-app-api/src/index.test.ts delete mode 100644 packages/core-plugin-api/src/index.test.ts delete mode 100644 plugins/todo-backend/src/index.test.ts delete mode 100644 plugins/todo/src/index.test.ts diff --git a/packages/core-app-api/src/index.test.ts b/packages/core-app-api/src/index.test.ts deleted file mode 100644 index bbbf2b8679..0000000000 --- a/packages/core-app-api/src/index.test.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2020 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 * as index from '.'; - -describe('index', () => { - it('exports the app api', () => { - expect(index).toEqual({ - // Public API - createApp: expect.any(Function), - defaultConfigLoader: expect.any(Function), - ApiProvider: expect.any(Function), - // TODO(Rugvip): Figure out if we need these - ApiFactoryRegistry: expect.any(Function), - ApiResolver: expect.any(Function), - ApiRegistry: expect.any(Function), - - // Components - FlatRoutes: expect.any(Function), - - // Utility API Implementations - AlertApiForwarder: expect.any(Function), - AppThemeSelector: expect.any(Function), - Auth0Auth: expect.any(Function), - ConfigReader: expect.any(Function), - ErrorAlerter: expect.any(Function), - ErrorApiForwarder: expect.any(Function), - UnhandledErrorForwarder: expect.any(Function), - FeatureFlagged: expect.any(Function), - GithubAuth: expect.any(Function), - GitlabAuth: expect.any(Function), - GoogleAuth: expect.any(Function), - LocalStorageFeatureFlags: expect.any(Function), - MicrosoftAuth: expect.any(Function), - OAuth2: expect.any(Function), - OAuthRequestManager: expect.any(Function), - OktaAuth: expect.any(Function), - OneLoginAuth: expect.any(Function), - SamlAuth: expect.any(Function), - UrlPatternDiscovery: expect.any(Function), - WebStorage: expect.any(Function), - }); - }); -}); diff --git a/packages/core-plugin-api/src/index.test.ts b/packages/core-plugin-api/src/index.test.ts deleted file mode 100644 index ebab471c54..0000000000 --- a/packages/core-plugin-api/src/index.test.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2020 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 * as index from '.'; -import { createApiRef } from '.'; - -describe('index', () => { - const ApiRef = Object.getPrototypeOf(createApiRef({ id: 'x' })).constructor; - - it('exports the plugin api', () => { - expect(index).toEqual({ - FeatureFlagState: { - 0: 'None', - 1: 'Active', - Active: 1, - None: 0, - }, - SessionState: expect.any(Object), - attachComponentData: expect.any(Function), - createApiFactory: expect.any(Function), - createComponentExtension: expect.any(Function), - createPlugin: expect.any(Function), - createReactExtension: expect.any(Function), - createRoutableExtension: expect.any(Function), - - getComponentData: expect.any(Function), - useApi: expect.any(Function), - useApiHolder: expect.any(Function), - useApp: expect.any(Function), - useElementFilter: expect.any(Function), - useRouteRef: expect.any(Function), - useRouteRefParams: expect.any(Function), - withApis: expect.any(Function), - - createApiRef: expect.any(Function), - createExternalRouteRef: expect.any(Function), - createRouteRef: expect.any(Function), - createSubRouteRef: expect.any(Function), - - alertApiRef: expect.any(ApiRef), - appThemeApiRef: expect.any(ApiRef), - auth0AuthApiRef: expect.any(ApiRef), - configApiRef: expect.any(ApiRef), - discoveryApiRef: expect.any(ApiRef), - errorApiRef: expect.any(ApiRef), - featureFlagsApiRef: expect.any(ApiRef), - githubAuthApiRef: expect.any(ApiRef), - gitlabAuthApiRef: expect.any(ApiRef), - googleAuthApiRef: expect.any(ApiRef), - identityApiRef: expect.any(ApiRef), - microsoftAuthApiRef: expect.any(ApiRef), - oauth2ApiRef: expect.any(ApiRef), - oauthRequestApiRef: expect.any(ApiRef), - oidcAuthApiRef: expect.any(ApiRef), - oktaAuthApiRef: expect.any(ApiRef), - oneloginAuthApiRef: expect.any(ApiRef), - samlAuthApiRef: expect.any(ApiRef), - storageApiRef: expect.any(ApiRef), - }); - }); -}); diff --git a/plugins/todo-backend/src/index.test.ts b/plugins/todo-backend/src/index.test.ts deleted file mode 100644 index 56a8302f1a..0000000000 --- a/plugins/todo-backend/src/index.test.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2021 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 * as index from './index'; - -describe('imports', () => { - it('should export known symbols only', () => { - expect(index).toEqual({ - createRouter: expect.any(Function), - createTodoParser: expect.any(Function), - TodoScmReader: expect.any(Function), - TodoReaderService: expect.any(Function), - }); - }); -}); diff --git a/plugins/todo/src/index.test.ts b/plugins/todo/src/index.test.ts deleted file mode 100644 index 1ca40a8eac..0000000000 --- a/plugins/todo/src/index.test.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2021 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 * as index from './index'; - -describe('imports', () => { - it('should export known symbols only', () => { - expect(index).toEqual({ - todoPlugin: expect.any(Object), - todoApiRef: expect.any(Object), - EntityTodoContent: expect.any(Function), - }); - }); -});