add a test to make sure the targets in package.json are well formatted
parent
b8498f7a2b
commit
2207b53890
@ -1,4 +1,20 @@
|
|||||||
|
import { readFileSync } from 'fs-extra';
|
||||||
|
import { isEmpty } from 'lodash';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
describe('Updater', () => {
|
describe('Updater', () => {
|
||||||
// tslint:disable-next-line: no-empty
|
// tslint:disable-next-line: no-empty
|
||||||
it.skip('isUpdateAvailable', () => {});
|
it.skip('isUpdateAvailable', () => {});
|
||||||
|
|
||||||
|
it('package.json target are correct', () => {
|
||||||
|
const content = readFileSync(
|
||||||
|
path.join(__dirname, '..', '..', '..', '..', '..', 'package.json')
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!content || isEmpty(content) || !content.includes('"target": ["deb", "rpm", "freebsd"],')) {
|
||||||
|
throw new Error(
|
||||||
|
'Content empty or does not contain the target on a single line. They have to be for the linux appImage build to pass.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue