insomnia/app/__tests__/package.test.js

19 lines
663 B
JavaScript

import * as appPackage from '../package.json';
import * as globalPackage from '../../package.json';
import {globalBeforeEach} from '../__jest__/before-each';
describe('package.json', () => {
beforeEach(globalBeforeEach);
it('all app dependencies should be same in global', () => {
for (const name of Object.keys(appPackage.dependencies)) {
const expected = globalPackage.dependencies[name];
const actual = appPackage.dependencies[name];
expect(`${name}::${actual}`).toBe(`${name}::${expected}`);
}
});
it('pdfjs should not be in deps', () => {
expect(appPackage.dependencies['simple-react-pdf']).toBeUndefined();
});
});