Skip to content

Commit

Permalink
Creating test for platform when using electron
Browse files Browse the repository at this point in the history
  • Loading branch information
diegodev3 committed Jul 14, 2020
1 parent fb1c26a commit 4f75960
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unit/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,12 @@ describe('Platform-detection', function () {
assert.strictEqual('arm64v8', platform().split('-')[1]);
delete process.env.npm_config_arch;
});

it('Can ensure version ARMv7 if electron version is present', function () {
process.env.npm_config_arch = 'arm';
process.versions.electron = 'test';
assert.strictEqual('armv7', platform().split('-')[1]);
delete process.env.npm_config_arm_version;
delete process.versions.electron;
});
});

0 comments on commit 4f75960

Please sign in to comment.