Skip to content

Commit

Permalink
test(core): re-enable & refactor native module test (#2311)
Browse files Browse the repository at this point in the history
  • Loading branch information
malept authored Jun 7, 2021
1 parent a0e9dcb commit 94b0f96
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions packages/api/core/test/slow/api_spec_slow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,25 @@ describe('Electron Forge API', () => {
await fs.remove(path.resolve(dir, 'out'));
});

// TODO(malept): unskip when Electron 13 works correctly
it.skip('can package without errors with native pre-gyp deps installed', async () => {
await installDeps(dir, ['ref-napi']);
await forge.package({ dir });
await fs.remove(path.resolve(dir, 'node_modules/ref-napi'));
describe('with native pre-gyp deps installed', () => {
before(async () => {
await installDeps(dir, ['ref-napi']);
});

it('can package without errors', async () => {
await forge.package({ dir });
});

after(async () => {
await fs.remove(path.resolve(dir, 'node_modules/ref-napi'));
await updatePackageJSON(dir, async (packageJSON) => {
delete packageJSON.dependencies['ref-napi'];
});
});
});

it('can package without errors', async () => {
await updatePackageJSON(dir, async (packageJSON) => {
delete packageJSON.dependencies['ref-napi'];
packageJSON.config.forge.packagerConfig.asar = true;
});

Expand Down

0 comments on commit 94b0f96

Please sign in to comment.