ghost-portal/packages/apps-config/src/api/index.spec.ts
Jaco 4bfda46580
Swap TS resolution to base config (#9194)
* Swap TS resolution to base config

* Run build fixup before lint

* Adjust with specific comment on fixup
2023-03-17 12:55:10 +02:00

27 lines
691 B
TypeScript

// Copyright 2017-2023 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { OverrideBundleDefinition } from '@polkadot/types/types';
import spec from './spec/index.js';
import { typesBundle } from './index.js';
function getDerives (spec: Record<string, OverrideBundleDefinition>): string[] {
return Object
.entries(spec)
.filter(([, v]) => !!v.derives)
.map(([k]) => k);
}
describe('typesBundle', (): void => {
it('all derives are re-exported', (): void => {
expect(
getDerives(spec)
).toEqual(
getDerives(typesBundle.spec || {})
);
});
});