Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as fs from 'fs-extra';
import * as path from 'path';
import * as os from 'os';
import * as ora from 'ora';
import { spawnPromise } from 'spawn-rx';
import { expect } from 'chai';
import { rebuild } from '../src/rebuild';
ora.ora = ora;
describe('rebuilder', () => {
const testModulePath = path.resolve(os.tmpdir(), 'electron-forge-rebuild-test');
const resetTestModule = async () => {
await fs.remove(testModulePath);
await fs.mkdirs(testModulePath);
await fs.writeFile(path.resolve(testModulePath, 'package.json'), await fs.readFile(path.resolve(__dirname, '../test/fixture/native-app1/package.json'), 'utf8'));
await spawnPromise('npm', ['install'], {
cwd: testModulePath,
stdio: 'ignore',
});
};
describe('core behavior', function() {
this.timeout(2 * 60 * 1000);