add another spec, rm unused var

This commit is contained in:
Mark Delk 2023-11-26 00:29:13 -06:00
parent 9f5e80ae9e
commit 8269bac1f7

View File

@ -1,5 +1,4 @@
const assert = require('assert').strict const assert = require('assert').strict
const semver = require('semver')
const { const {
resolveCommit, resolveCommit,
resolveVersion resolveVersion
@ -21,6 +20,11 @@ async function test () {
variantName: 'zig-windows-x86_64-0.12.0-dev.1092', variantName: 'zig-windows-x86_64-0.12.0-dev.1092',
version: '0.12.0-dev.1092' version: '0.12.0-dev.1092'
}) })
assert.deepEqual(resolveCommit('darwin', '0.12.0-dev.1150+3c22cecee'), {
downloadUrl: 'https://ziglang.org/builds/zig-macos-x86_64-0.12.0-dev.1150+3c22cecee.tar.xz',
variantName: 'zig-macos-x86_64-0.12.0-dev.1150',
version: '0.12.0-dev.1150'
})
assert.deepEqual(await resolveVersion('linux', '0.7.0'), { assert.deepEqual(await resolveVersion('linux', '0.7.0'), {
downloadUrl: 'https://ziglang.org/download/0.7.0/zig-linux-x86_64-0.7.0.tar.xz', downloadUrl: 'https://ziglang.org/download/0.7.0/zig-linux-x86_64-0.7.0.tar.xz',