Skip to content

Commit

Permalink
chore: fix install tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Jul 7, 2022
1 parent 55a7bdf commit 1d63450
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions standalone/install.jest.spec.ts
Expand Up @@ -106,19 +106,19 @@ describe('Install', () => {
describe('Skip install binary', () => {
it('Should not download it', async () => {
process.env.PACT_SKIP_BINARY_INSTALL = 'true';
const { binaryInstallSkipped } = await install('linux', 'ia32');
const { binaryInstallSkipped } = await install('linux', 'x64');
expect(binaryInstallSkipped).toBeTruthy();
});

it('Should download it', async () => {
const { binaryChecksum, binary } = getBinaryEntry('linux', 'ia32');
const { binaryChecksum, binary } = getBinaryEntry('linux', 'x64');
((fs as unknown) as FS).initFS({
[path.join(__dirname, binary)]: 'mock binary',
[path.join(__dirname, binaryChecksum)]: 'mock binary checksum',
});

process.env.PACT_SKIP_BINARY_INSTALL = 'false';
const { binaryInstallSkipped } = await install('linux', 'ia32');
const { binaryInstallSkipped } = await install('linux', 'x64');
expect(binaryInstallSkipped).toBeFalsy();
});
});
Expand Down
2 changes: 1 addition & 1 deletion standalone/install.ts
Expand Up @@ -106,7 +106,7 @@ export function createConfig(location: string = process.cwd()): Config {
binaryChecksum: `pact-${PACT_STANDALONE_VERSION}-linux-x86_64.tar.gz${CHECKSUM_SUFFIX}`,
downloadLocation: PACT_BINARY_LOCATION,
folderName: `linux-x64-${PACT_STANDALONE_VERSION}`,
}
},
],
};
}
Expand Down

0 comments on commit 1d63450

Please sign in to comment.