ghost-portal/packages/react-api/src/light.spec.ts
Jaco 4ee33fdac4
Add tests for added light specs (#8063)
* Add tests for added light specs

* Full path

* Exclude deps

* fs: false
2022-08-28 11:50:26 +03:00

23 lines
595 B
TypeScript

// Copyright 2017-2022 @polkadot/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import fs from 'fs';
import path from 'path';
import { assert } from '@polkadot/util';
import { lightSpecs } from './light';
describe('lightSpecs', (): void => {
describe.each(Object.keys(lightSpecs))('%s', (r): void => {
it.each(Object.keys(lightSpecs[r]))('%s', (s): void => {
assert(
fs.existsSync(
path.join(__dirname, lightSpecs[r][s])
),
`packages/react-api/src/${lightSpecs[r][s].slice(2)} does not exist`
);
});
});
});