Skip to content

Commit b3c51c1

Browse files
committed
test(download): cover Chocolatey release compatibility
1 parent 6d0a65d commit b3c51c1

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

‎apps/site/util/__tests__/download.test.mjs‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,26 @@ describe('INSTALL_METHODS', () => {
239239
assert.ok(nvmMethod?.iconImage);
240240
assert.equal(asdfMethod?.iconImage, undefined);
241241
});
242+
243+
it('should disable Chocolatey for Alpha releases only', () => {
244+
const choco = INSTALL_METHODS.find(method => method.value === 'CHOCO');
245+
assert.ok(choco);
246+
247+
const cases = [
248+
['v27.0.0-alpha.0.1.0', 'Alpha', true],
249+
['v26.13.0', 'Current', false],
250+
['v24.13.0', 'LTS', false],
251+
];
252+
253+
for (const [version, status, disabled] of cases) {
254+
const [method] = parseCompat([choco], {
255+
os: 'WIN',
256+
installMethod: 'CHOCO',
257+
platform: 'x64',
258+
version,
259+
release: { status },
260+
});
261+
assert.equal(method.disabled, disabled, `Chocolatey with ${status}`);
262+
}
263+
});
242264
});

0 commit comments

Comments
 (0)