Skip to content

Commit 1d4d460

Browse files
test(utils): update snapshots
1 parent ae8e03d commit 1d4d460

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/__snapshots__/utils.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

3-
exports[`getBinaryPath when OS is "darwin" returns CLI filepath 1`] = `"directory/name"`;
3+
exports[`getBinaryPath when platform is "darwin" returns CLI filepath 1`] = `"directory/name"`;
44

5-
exports[`getBinaryPath when OS is "linux" returns CLI filepath 1`] = `"directory/name"`;
5+
exports[`getBinaryPath when platform is "linux" returns CLI filepath 1`] = `"directory/name"`;
66

7-
exports[`getBinaryPath when OS is "win32" returns CLI filepath 1`] = `"directory/name.exe"`;
7+
exports[`getBinaryPath when platform is "win32" returns CLI filepath 1`] = `"directory/name.exe"`;
88

99
exports[`getDownloadObject when OS is "darwin" and arch is "arm" gets download object 1`] = `
1010
{

src/index.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ const cliName = 'cli-name';
2424
const cliVersion = '1.2.3';
2525
const pathToTarball = 'path/to/tarball';
2626
const pathToCLI = 'path/to/cli';
27+
const platforms = ['darwin', 'win32', 'linux'];
2728

28-
describe.each(['darwin', 'win32', 'linux'])('when os is %p', (platform) => {
29+
describe.each(platforms)('when platform is %p', (platform) => {
2930
beforeEach(() => {
3031
mockedOs.platform.mockReturnValue(platform as NodeJS.Platform);
3132
mockedOs.arch.mockReturnValue('arm64' as NodeJS.Architecture);

src/utils.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ const platforms: NodeJS.Platform[] = ['darwin', 'linux', 'win32'];
99
const architectures = ['arm', 'x32', 'x64'] as NodeJS.Architecture[];
1010

1111
const table = platforms.reduce(
12-
(testSuites, os) => [
12+
(testSuites, platform) => [
1313
...testSuites,
1414
...architectures.map(
15-
(arch) => [os, arch] as [NodeJS.Platform, NodeJS.Architecture],
15+
(arch) => [platform, arch] as [NodeJS.Platform, NodeJS.Architecture],
1616
),
1717
],
1818
[] as [NodeJS.Platform, NodeJS.Architecture][],
@@ -35,10 +35,10 @@ describe('getDownloadObject', () => {
3535
});
3636

3737
describe('getBinaryPath', () => {
38-
describe.each(platforms)('when OS is %p', (os) => {
38+
describe.each(platforms)('when platform is %p', (platform) => {
3939
beforeEach(() => {
4040
jest.resetAllMocks();
41-
mockedOs.platform.mockReturnValueOnce(os);
41+
mockedOs.platform.mockReturnValueOnce(platform);
4242
});
4343

4444
it('returns CLI filepath', () => {

0 commit comments

Comments
 (0)