Merge pull request #6202 from backstage/rugvip/no-index-tests

remove index tests
This commit is contained in:
Patrik Oldsberg
2021-06-24 17:44:29 +02:00
committed by GitHub
4 changed files with 0 additions and 186 deletions
-57
View File
@@ -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),
});
});
});
@@ -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),
});
});
});
-28
View File
@@ -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),
});
});
});
-27
View File
@@ -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),
});
});
});