MyCrypto/spec/package.json.spec.ts
Daniel Ternyak 7930ab6611
Revert "Upgrade to Webpack 4 (#1386)" (#1406)
This reverts commit d19c4f44e6b74fee412e69019cb2c98c876e1c8e.
2018-03-28 14:34:29 -05:00

24 lines
794 B
TypeScript

import packageJSON from '../package.json';
// from https://docs.npmjs.com/files/package.json#dependencies
const nonExactPrefixes = ['~', '^', '>', '>=', '<', '<='];
describe('package.json', () => {
it('dependencies should not contain any non-exact versions', () => {
const deps = Object.values(packageJSON.dependencies);
deps.forEach(depVersion => {
nonExactPrefixes.forEach(badPrefix => {
expect(depVersion.includes(badPrefix)).toBeFalsy();
});
});
});
it('devDependencies should not contain any non-exact versions', () => {
const deps = Object.values(packageJSON.devDependencies);
deps.forEach(depVersion => {
nonExactPrefixes.forEach(badPrefix => {
expect(depVersion.includes(badPrefix)).toBeFalsy();
});
});
});
});