updated tests
parent
ecf0ce62f9
commit
8885b7194e
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Debug Jest Tests on Nix",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"--inspect-brk",
|
||||||
|
"${workspaceRoot}/node_modules/.bin/jest",
|
||||||
|
"--runInBand"
|
||||||
|
],
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"internalConsoleOptions": "neverOpen",
|
||||||
|
"port": 9229
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,770 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"version": "v14.1.0",
|
||||||
|
"date": "2020-04-29",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.14.4",
|
||||||
|
"v8": "8.1.307.31",
|
||||||
|
"uv": "1.37.0",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.1.1g",
|
||||||
|
"modules": "83",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v14.0.0",
|
||||||
|
"date": "2020-04-21",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.14.4",
|
||||||
|
"v8": "8.1.307.30",
|
||||||
|
"uv": "1.37.0",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.1.1f",
|
||||||
|
"modules": "83",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v13.14.0",
|
||||||
|
"date": "2020-04-28",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.14.4",
|
||||||
|
"v8": "7.9.317.25",
|
||||||
|
"uv": "1.37.0",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.1.1g",
|
||||||
|
"modules": "79",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v13.13.0",
|
||||||
|
"date": "2020-04-14",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.14.4",
|
||||||
|
"v8": "7.9.317.25",
|
||||||
|
"uv": "1.35.0",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.1.1f",
|
||||||
|
"modules": "79",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v12.16.3",
|
||||||
|
"date": "2020-04-28",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.14.4",
|
||||||
|
"v8": "7.8.279.23",
|
||||||
|
"uv": "1.34.2",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.1.1g",
|
||||||
|
"modules": "72",
|
||||||
|
"lts": "Erbium",
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v12.16.2",
|
||||||
|
"date": "2020-04-08",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.14.4",
|
||||||
|
"v8": "7.8.279.23",
|
||||||
|
"uv": "1.34.2",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.1.1e",
|
||||||
|
"modules": "72",
|
||||||
|
"lts": "Erbium",
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v12.1.0",
|
||||||
|
"date": "2019-04-29",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.9.0",
|
||||||
|
"v8": "7.4.288.21",
|
||||||
|
"uv": "1.28.0",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.1.1b",
|
||||||
|
"modules": "72",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v11.15.0",
|
||||||
|
"date": "2019-04-30",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.7.0",
|
||||||
|
"v8": "7.0.276.38",
|
||||||
|
"uv": "1.27.0",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.1.1b",
|
||||||
|
"modules": "67",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v10.20.1",
|
||||||
|
"date": "2020-04-10",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.14.4",
|
||||||
|
"v8": "6.8.275.32",
|
||||||
|
"uv": "1.34.2",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.1.1e",
|
||||||
|
"modules": "64",
|
||||||
|
"lts": "Dubnium",
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v10.20.0",
|
||||||
|
"date": "2020-03-24",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.14.4",
|
||||||
|
"v8": "6.8.275.32",
|
||||||
|
"uv": "1.34.2",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.1.1e",
|
||||||
|
"modules": "64",
|
||||||
|
"lts": "Dubnium",
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v9.11.2",
|
||||||
|
"date": "2018-06-12",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "5.6.0",
|
||||||
|
"v8": "6.2.414.46",
|
||||||
|
"uv": "1.19.2",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.0.2o",
|
||||||
|
"modules": "59",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v9.11.1",
|
||||||
|
"date": "2018-04-05",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "5.6.0",
|
||||||
|
"v8": "6.2.414.46",
|
||||||
|
"uv": "1.19.2",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.0.2o",
|
||||||
|
"modules": "59",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v8.17.0",
|
||||||
|
"date": "2019-12-17",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.13.4",
|
||||||
|
"v8": "6.2.414.78",
|
||||||
|
"uv": "1.23.2",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.0.2s",
|
||||||
|
"modules": "57",
|
||||||
|
"lts": "Carbon",
|
||||||
|
"security": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v8.16.2",
|
||||||
|
"date": "2019-10-08",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "6.4.1",
|
||||||
|
"v8": "6.2.414.78",
|
||||||
|
"uv": "1.23.2",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.0.2s",
|
||||||
|
"modules": "57",
|
||||||
|
"lts": "Carbon",
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v7.10.1",
|
||||||
|
"date": "2017-07-11",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "4.2.0",
|
||||||
|
"v8": "5.5.372.43",
|
||||||
|
"uv": "1.11.0",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.0.2k",
|
||||||
|
"modules": "51",
|
||||||
|
"lts": false,
|
||||||
|
"security": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v7.10.0",
|
||||||
|
"date": "2017-05-02",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "4.2.0",
|
||||||
|
"v8": "5.5.372.43",
|
||||||
|
"uv": "1.11.0",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.0.2k",
|
||||||
|
"modules": "51",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v6.17.1",
|
||||||
|
"date": "2019-04-03",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "3.10.10",
|
||||||
|
"v8": "5.1.281.111",
|
||||||
|
"uv": "1.16.1",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.0.2r",
|
||||||
|
"modules": "48",
|
||||||
|
"lts": "Boron",
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v6.17.0",
|
||||||
|
"date": "2019-02-28",
|
||||||
|
"files": [
|
||||||
|
"aix-ppc64",
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-s390x",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "3.10.10",
|
||||||
|
"v8": "5.1.281.111",
|
||||||
|
"uv": "1.16.1",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.0.2r",
|
||||||
|
"modules": "48",
|
||||||
|
"lts": "Boron",
|
||||||
|
"security": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v5.12.0",
|
||||||
|
"date": "2016-06-23",
|
||||||
|
"files": [
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi"
|
||||||
|
],
|
||||||
|
"npm": "3.8.6",
|
||||||
|
"v8": "4.6.85.32",
|
||||||
|
"uv": "1.8.0",
|
||||||
|
"zlib": "1.2.8",
|
||||||
|
"openssl": "1.0.2h",
|
||||||
|
"modules": "47",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v4.9.1",
|
||||||
|
"date": "2018-03-29",
|
||||||
|
"files": [
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "2.15.11",
|
||||||
|
"v8": "4.5.103.53",
|
||||||
|
"uv": "1.9.1",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.0.2o",
|
||||||
|
"modules": "46",
|
||||||
|
"lts": "Argon",
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v4.9.0",
|
||||||
|
"date": "2018-03-28",
|
||||||
|
"files": [
|
||||||
|
"headers",
|
||||||
|
"linux-arm64",
|
||||||
|
"linux-armv6l",
|
||||||
|
"linux-armv7l",
|
||||||
|
"linux-ppc64le",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-7z",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x64-msi",
|
||||||
|
"win-x64-zip",
|
||||||
|
"win-x86-7z",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi",
|
||||||
|
"win-x86-zip"
|
||||||
|
],
|
||||||
|
"npm": "2.15.11",
|
||||||
|
"v8": "4.5.103.53",
|
||||||
|
"uv": "1.9.1",
|
||||||
|
"zlib": "1.2.11",
|
||||||
|
"openssl": "1.0.2o",
|
||||||
|
"modules": "46",
|
||||||
|
"lts": "Argon",
|
||||||
|
"security": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v0.12.18",
|
||||||
|
"date": "2017-02-22",
|
||||||
|
"files": [
|
||||||
|
"headers",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"osx-x86-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi"
|
||||||
|
],
|
||||||
|
"npm": "2.15.11",
|
||||||
|
"v8": "3.28.71.20",
|
||||||
|
"uv": "1.6.1",
|
||||||
|
"zlib": "1.2.8",
|
||||||
|
"openssl": "1.0.1u",
|
||||||
|
"modules": "14",
|
||||||
|
"lts": false,
|
||||||
|
"security": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "v0.12.17",
|
||||||
|
"date": "2016-10-18",
|
||||||
|
"files": [
|
||||||
|
"headers",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x86",
|
||||||
|
"osx-x64-pkg",
|
||||||
|
"osx-x64-tar",
|
||||||
|
"osx-x86-tar",
|
||||||
|
"src",
|
||||||
|
"sunos-x64",
|
||||||
|
"sunos-x86",
|
||||||
|
"win-x64-exe",
|
||||||
|
"win-x86-exe",
|
||||||
|
"win-x86-msi"
|
||||||
|
],
|
||||||
|
"npm": "2.15.1",
|
||||||
|
"v8": "3.28.71.19",
|
||||||
|
"uv": "1.6.1",
|
||||||
|
"zlib": "1.2.8",
|
||||||
|
"openssl": "1.0.1u",
|
||||||
|
"modules": "14",
|
||||||
|
"lts": false,
|
||||||
|
"security": true
|
||||||
|
}
|
||||||
|
]
|
@ -0,0 +1,152 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"version": "14.0.0",
|
||||||
|
"stable": true,
|
||||||
|
"release_url": "https://github.com/actions/node-versions/releases/tag/14.0.0-20200423.30",
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"filename": "node-14.0.0-darwin-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "darwin",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/14.0.0-20200423.30/node-14.0.0-darwin-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-14.0.0-linux-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "linux",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/14.0.0-20200423.30/node-14.0.0-linux-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-14.0.0-win32-x64.zip",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/14.0.0-20200423.30/node-14.0.0-win32-x64.zip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "13.13.0",
|
||||||
|
"stable": true,
|
||||||
|
"release_url": "https://github.com/actions/node-versions/releases/tag/13.13.0-20200423.29",
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"filename": "node-13.13.0-darwin-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "darwin",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/13.13.0-20200423.29/node-13.13.0-darwin-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-13.13.0-linux-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "linux",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/13.13.0-20200423.29/node-13.13.0-linux-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-13.13.0-win32-x64.zip",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/13.13.0-20200423.29/node-13.13.0-win32-x64.zip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "12.16.2",
|
||||||
|
"stable": true,
|
||||||
|
"release_url": "https://github.com/actions/node-versions/releases/tag/12.16.2-20200423.28",
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"filename": "node-12.16.2-darwin-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "darwin",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/12.16.2-20200423.28/node-12.16.2-darwin-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-12.16.2-linux-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "linux",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/12.16.2-20200423.28/node-12.16.2-linux-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-12.16.2-win32-x64.zip",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/12.16.2-20200423.28/node-12.16.2-win32-x64.zip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "10.20.1",
|
||||||
|
"stable": true,
|
||||||
|
"release_url": "https://github.com/actions/node-versions/releases/tag/10.20.1-20200423.27",
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"filename": "node-10.20.1-darwin-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "darwin",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/10.20.1-20200423.27/node-10.20.1-darwin-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-10.20.1-linux-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "linux",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/10.20.1-20200423.27/node-10.20.1-linux-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-10.20.1-win32-x64.zip",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/10.20.1-20200423.27/node-10.20.1-win32-x64.zip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "8.17.0",
|
||||||
|
"stable": true,
|
||||||
|
"release_url": "https://github.com/actions/node-versions/releases/tag/8.17.0-20200423.26",
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"filename": "node-8.17.0-darwin-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "darwin",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/8.17.0-20200423.26/node-8.17.0-darwin-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-8.17.0-linux-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "linux",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/8.17.0-20200423.26/node-8.17.0-linux-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-8.17.0-win32-x64.zip",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/8.17.0-20200423.26/node-8.17.0-win32-x64.zip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "6.17.1",
|
||||||
|
"stable": true,
|
||||||
|
"release_url": "https://github.com/actions/node-versions/releases/tag/6.17.1-20200423.25",
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"filename": "node-6.17.1-darwin-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "darwin",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/6.17.1-20200423.25/node-6.17.1-darwin-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-6.17.1-linux-x64.tar.gz",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "linux",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/6.17.1-20200423.25/node-6.17.1-linux-x64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "node-6.17.1-win32-x64.zip",
|
||||||
|
"arch": "x64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://github.com/actions/node-versions/releases/download/6.17.1-20200423.25/node-6.17.1-win32-x64.zip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
@ -1,123 +1,336 @@
|
|||||||
|
import * as core from '@actions/core';
|
||||||
import * as io from '@actions/io';
|
import * as io from '@actions/io';
|
||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
import * as fs from 'fs';
|
import fs from 'fs';
|
||||||
import * as os from 'os';
|
import cp from 'child_process';
|
||||||
import * as path from 'path';
|
import osm = require('os');
|
||||||
import * as installer from '../src/installer';
|
import path from 'path';
|
||||||
|
import * as main from '../src/main';
|
||||||
const isWindows = process.platform === 'win32';
|
import * as im from '../src/installer';
|
||||||
let toolDir: string;
|
import * as auth from '../src/authutil';
|
||||||
|
|
||||||
describe('installer tests', () => {
|
let nodeTestManifest = require('./data/versions-manifest.json');
|
||||||
beforeAll(async () => {
|
let nodeTestDist = require('./data/node-dist-index.json');
|
||||||
toolDir = path.join(
|
|
||||||
__dirname,
|
// let matchers = require('../matchers.json');
|
||||||
'runner',
|
// let matcherPattern = matchers.problemMatcher[0].pattern[0];
|
||||||
path.join(
|
// let matcherRegExp = new RegExp(matcherPattern.regexp);
|
||||||
Math.random()
|
|
||||||
.toString(36)
|
describe('setup-node', () => {
|
||||||
.substring(7)
|
let inputs = {} as any;
|
||||||
),
|
let os = {} as any;
|
||||||
'tools'
|
|
||||||
|
let inSpy: jest.SpyInstance;
|
||||||
|
let findSpy: jest.SpyInstance;
|
||||||
|
let cnSpy: jest.SpyInstance;
|
||||||
|
let logSpy: jest.SpyInstance;
|
||||||
|
let getManifestSpy: jest.SpyInstance;
|
||||||
|
let getDistSpy: jest.SpyInstance;
|
||||||
|
let platSpy: jest.SpyInstance;
|
||||||
|
let archSpy: jest.SpyInstance;
|
||||||
|
let dlSpy: jest.SpyInstance;
|
||||||
|
let exSpy: jest.SpyInstance;
|
||||||
|
let cacheSpy: jest.SpyInstance;
|
||||||
|
let dbgSpy: jest.SpyInstance;
|
||||||
|
let whichSpy: jest.SpyInstance;
|
||||||
|
let existsSpy: jest.SpyInstance;
|
||||||
|
let mkdirpSpy: jest.SpyInstance;
|
||||||
|
let execSpy: jest.SpyInstance;
|
||||||
|
let authSpy: jest.SpyInstance;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
// @actions/core
|
||||||
|
inputs = {};
|
||||||
|
inSpy = jest.spyOn(core, 'getInput');
|
||||||
|
inSpy.mockImplementation(name => inputs[name]);
|
||||||
|
|
||||||
|
// node
|
||||||
|
os = {};
|
||||||
|
platSpy = jest.spyOn(osm, 'platform');
|
||||||
|
platSpy.mockImplementation(() => os['platform']);
|
||||||
|
archSpy = jest.spyOn(osm, 'arch');
|
||||||
|
archSpy.mockImplementation(() => os['arch']);
|
||||||
|
execSpy = jest.spyOn(cp, 'execSync');
|
||||||
|
|
||||||
|
// @actions/tool-cache
|
||||||
|
findSpy = jest.spyOn(tc, 'find');
|
||||||
|
dlSpy = jest.spyOn(tc, 'downloadTool');
|
||||||
|
exSpy = jest.spyOn(tc, 'extractTar');
|
||||||
|
cacheSpy = jest.spyOn(tc, 'cacheDir');
|
||||||
|
getManifestSpy = jest.spyOn(tc, 'getManifestFromRepo');
|
||||||
|
getDistSpy = jest.spyOn(im, 'getVersionsFromDist');
|
||||||
|
|
||||||
|
// io
|
||||||
|
whichSpy = jest.spyOn(io, 'which');
|
||||||
|
existsSpy = jest.spyOn(fs, 'existsSync');
|
||||||
|
mkdirpSpy = jest.spyOn(io, 'mkdirP');
|
||||||
|
|
||||||
|
// disable authentication portion for installer tests
|
||||||
|
authSpy = jest.spyOn(auth, 'configAuthentication');
|
||||||
|
authSpy.mockImplementation(() => {});
|
||||||
|
|
||||||
|
// gets
|
||||||
|
getManifestSpy.mockImplementation(
|
||||||
|
() => <tc.IToolRelease[]>nodeTestManifest
|
||||||
|
);
|
||||||
|
getDistSpy.mockImplementation(() => <im.INodeVersion>nodeTestDist);
|
||||||
|
|
||||||
|
// writes
|
||||||
|
cnSpy = jest.spyOn(process.stdout, 'write');
|
||||||
|
logSpy = jest.spyOn(console, 'log');
|
||||||
|
dbgSpy = jest.spyOn(core, 'debug');
|
||||||
|
cnSpy.mockImplementation(line => {
|
||||||
|
// uncomment to debug
|
||||||
|
// process.stderr.write('write:' + line + '\n');
|
||||||
|
});
|
||||||
|
logSpy.mockImplementation(line => {
|
||||||
|
// uncomment to debug
|
||||||
|
// process.stderr.write('log:' + line + '\n');
|
||||||
|
});
|
||||||
|
dbgSpy.mockImplementation(msg => {
|
||||||
|
// uncomment to see debug output
|
||||||
|
// process.stderr.write(msg + '\n');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
jest.resetAllMocks();
|
||||||
|
jest.clearAllMocks();
|
||||||
|
//jest.restoreAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async () => {}, 100000);
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// Manifest find tests
|
||||||
|
//--------------------------------------------------
|
||||||
|
it('can mock manifest versions', async () => {
|
||||||
|
let versions: tc.IToolRelease[] | null = await tc.getManifestFromRepo(
|
||||||
|
'actions',
|
||||||
|
'node-versions',
|
||||||
|
'mocktoken'
|
||||||
|
);
|
||||||
|
expect(versions).toBeDefined();
|
||||||
|
expect(versions?.length).toBe(6);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can mock dist versions', async () => {
|
||||||
|
let versions: im.INodeVersion[] = await im.getVersionsFromDist();
|
||||||
|
expect(versions).toBeDefined();
|
||||||
|
expect(versions?.length).toBe(23);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can find 12.16.2 from manifest on osx', async () => {
|
||||||
|
os.platform = 'darwin';
|
||||||
|
os.arch = 'x64';
|
||||||
|
let versions: tc.IToolRelease[] | null = await tc.getManifestFromRepo(
|
||||||
|
'actions',
|
||||||
|
'node-versions',
|
||||||
|
'mocktoken'
|
||||||
|
);
|
||||||
|
expect(versions).toBeDefined();
|
||||||
|
let match = await tc.findFromManifest('12.16.2', true, versions);
|
||||||
|
expect(match).toBeDefined();
|
||||||
|
expect(match?.version).toBe('12.16.2');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can find 12 from manifest on linux', async () => {
|
||||||
|
os.platform = 'linux';
|
||||||
|
os.arch = 'x64';
|
||||||
|
let versions: tc.IToolRelease[] | null = await tc.getManifestFromRepo(
|
||||||
|
'actions',
|
||||||
|
'node-versions',
|
||||||
|
'mocktoken'
|
||||||
|
);
|
||||||
|
expect(versions).toBeDefined();
|
||||||
|
let match = await tc.findFromManifest('12.16.2', true, versions);
|
||||||
|
expect(match).toBeDefined();
|
||||||
|
expect(match?.version).toBe('12.16.2');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can find 10 from manifest on windows', async () => {
|
||||||
|
os.platform = 'win32';
|
||||||
|
os.arch = 'x64';
|
||||||
|
let versions: tc.IToolRelease[] | null = await tc.getManifestFromRepo(
|
||||||
|
'actions',
|
||||||
|
'node-versions',
|
||||||
|
'mocktoken'
|
||||||
|
);
|
||||||
|
expect(versions).toBeDefined();
|
||||||
|
let match = await tc.findFromManifest('10', true, versions);
|
||||||
|
expect(match).toBeDefined();
|
||||||
|
expect(match?.version).toBe('10.20.1');
|
||||||
|
});
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// Found in cache tests
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
it('finds version in cache with stable true', async () => {
|
||||||
|
inputs['node-version'] = '12';
|
||||||
|
inputs.stable = 'true';
|
||||||
|
|
||||||
|
let toolPath = path.normalize('/cache/node/12.16.1/x64');
|
||||||
|
findSpy.mockImplementation(() => toolPath);
|
||||||
|
await main.run();
|
||||||
|
|
||||||
|
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('finds version in cache with stable not supplied', async () => {
|
||||||
|
inputs['node-version'] = '12';
|
||||||
|
|
||||||
|
inSpy.mockImplementation(name => inputs[name]);
|
||||||
|
|
||||||
|
let toolPath = path.normalize('/cache/node/12.16.1/x64');
|
||||||
|
findSpy.mockImplementation(() => toolPath);
|
||||||
|
await main.run();
|
||||||
|
|
||||||
|
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('finds version in cache and adds it to the path', async () => {
|
||||||
|
inputs['node-version'] = '12';
|
||||||
|
|
||||||
|
inSpy.mockImplementation(name => inputs[name]);
|
||||||
|
|
||||||
|
let toolPath = path.normalize('/cache/node/12.16.1/x64');
|
||||||
|
findSpy.mockImplementation(() => toolPath);
|
||||||
|
await main.run();
|
||||||
|
|
||||||
|
let expPath = path.join(toolPath, 'bin');
|
||||||
|
expect(cnSpy).toHaveBeenCalledWith(`::add-path::${expPath}${osm.EOL}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('handles unhandled find error and reports error', async () => {
|
||||||
|
let errMsg = 'unhandled error message';
|
||||||
|
inputs['node-version'] = '12';
|
||||||
|
|
||||||
|
findSpy.mockImplementation(() => {
|
||||||
|
throw new Error(errMsg);
|
||||||
|
});
|
||||||
|
|
||||||
|
await main.run();
|
||||||
|
|
||||||
|
expect(cnSpy).toHaveBeenCalledWith('::error::' + errMsg + osm.EOL);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('downloads a version from a manifest match', async () => {
|
||||||
|
os.platform = 'linux';
|
||||||
|
os.arch = 'x64';
|
||||||
|
|
||||||
|
// a version which is in the manifest
|
||||||
|
let versionSpec = '12.16.2';
|
||||||
|
let resolvedVersion = versionSpec;
|
||||||
|
|
||||||
|
inputs['node-version'] = versionSpec;
|
||||||
|
inputs['always-auth'] = false;
|
||||||
|
inputs['token'] = 'faketoken';
|
||||||
|
|
||||||
|
let expectedUrl =
|
||||||
|
'https://github.com/actions/node-versions/releases/download/12.16.2-20200423.28/node-12.16.2-linux-x64.tar.gz';
|
||||||
|
|
||||||
|
// ... but not in the local cache
|
||||||
|
findSpy.mockImplementation(() => '');
|
||||||
|
|
||||||
|
dlSpy.mockImplementation(async () => '/some/temp/path');
|
||||||
|
let toolPath = path.normalize('/cache/node/12.16.2/x64');
|
||||||
|
exSpy.mockImplementation(async () => '/some/other/temp/path');
|
||||||
|
cacheSpy.mockImplementation(async () => toolPath);
|
||||||
|
|
||||||
|
await main.run();
|
||||||
|
|
||||||
|
let expPath = path.join(toolPath, 'bin');
|
||||||
|
|
||||||
|
expect(dlSpy).toHaveBeenCalled();
|
||||||
|
expect(exSpy).toHaveBeenCalled();
|
||||||
|
expect(logSpy).toHaveBeenCalledWith(
|
||||||
|
`Acquiring ${resolvedVersion} from ${expectedUrl}`
|
||||||
);
|
);
|
||||||
const tempDir = path.join(
|
expect(logSpy).toHaveBeenCalledWith(
|
||||||
__dirname,
|
`Attempting to download ${versionSpec}...`
|
||||||
'runner',
|
|
||||||
path.join(
|
|
||||||
Math.random()
|
|
||||||
.toString(36)
|
|
||||||
.substring(7)
|
|
||||||
),
|
|
||||||
'temp'
|
|
||||||
);
|
);
|
||||||
await io.rmRF(toolDir);
|
expect(cnSpy).toHaveBeenCalledWith(`::add-path::${expPath}${osm.EOL}`);
|
||||||
await io.rmRF(tempDir);
|
});
|
||||||
process.env['RUNNER_TOOL_CACHE'] = toolDir;
|
|
||||||
process.env['RUNNER_TEMP'] = tempDir;
|
it('falls back to a version from node dist', async () => {
|
||||||
}, 100000);
|
os.platform = 'linux';
|
||||||
|
os.arch = 'x64';
|
||||||
it('Acquires version of node if no matching version is installed', async () => {
|
|
||||||
await installer.getNode('10.16.0');
|
// a version which is not in the manifest but is in node dist
|
||||||
const nodeDir = path.join(toolDir, 'node', '10.16.0', os.arch());
|
let versionSpec = '11.15.0';
|
||||||
|
let resolvedVersion = versionSpec;
|
||||||
expect(fs.existsSync(`${nodeDir}.complete`)).toBe(true);
|
|
||||||
if (isWindows) {
|
inputs['node-version'] = versionSpec;
|
||||||
expect(fs.existsSync(path.join(nodeDir, 'node.exe'))).toBe(true);
|
inputs['always-auth'] = false;
|
||||||
} else {
|
inputs['token'] = 'faketoken';
|
||||||
expect(fs.existsSync(path.join(nodeDir, 'bin', 'node'))).toBe(true);
|
|
||||||
}
|
let expectedUrl =
|
||||||
}, 100000);
|
'https://github.com/actions/node-versions/releases/download/12.16.2-20200423.28/node-12.16.2-linux-x64.tar.gz';
|
||||||
|
|
||||||
if (isWindows) {
|
// ... but not in the local cache
|
||||||
it('Falls back to backup location if first one doesnt contain correct version', async () => {
|
findSpy.mockImplementation(() => '');
|
||||||
await installer.getNode('5.10.1');
|
|
||||||
const nodeDir = path.join(toolDir, 'node', '5.10.1', os.arch());
|
dlSpy.mockImplementation(async () => '/some/temp/path');
|
||||||
|
let toolPath = path.normalize('/cache/node/11.11.0/x64');
|
||||||
expect(fs.existsSync(`${nodeDir}.complete`)).toBe(true);
|
exSpy.mockImplementation(async () => '/some/other/temp/path');
|
||||||
expect(fs.existsSync(path.join(nodeDir, 'node.exe'))).toBe(true);
|
cacheSpy.mockImplementation(async () => toolPath);
|
||||||
}, 100000);
|
|
||||||
|
await main.run();
|
||||||
it('Falls back to third location if second one doesnt contain correct version', async () => {
|
|
||||||
await installer.getNode('0.12.18');
|
let expPath = path.join(toolPath, 'bin');
|
||||||
const nodeDir = path.join(toolDir, 'node', '0.12.18', os.arch());
|
|
||||||
|
expect(dlSpy).toHaveBeenCalled();
|
||||||
expect(fs.existsSync(`${nodeDir}.complete`)).toBe(true);
|
expect(exSpy).toHaveBeenCalled();
|
||||||
expect(fs.existsSync(path.join(nodeDir, 'node.exe'))).toBe(true);
|
expect(logSpy).toHaveBeenCalledWith(
|
||||||
}, 100000);
|
'Not found in manifest. Falling back to download directly from Node'
|
||||||
}
|
);
|
||||||
|
expect(logSpy).toHaveBeenCalledWith(
|
||||||
it('Throws if no location contains correct node version', async () => {
|
`Attempting to download ${versionSpec}...`
|
||||||
let thrown = false;
|
);
|
||||||
try {
|
expect(cnSpy).toHaveBeenCalledWith(`::add-path::${expPath}${osm.EOL}`);
|
||||||
await installer.getNode('1000');
|
});
|
||||||
} catch {
|
|
||||||
thrown = true;
|
it('does not find a version that does not exist', async () => {
|
||||||
}
|
os.platform = 'linux';
|
||||||
expect(thrown).toBe(true);
|
os.arch = 'x64';
|
||||||
});
|
|
||||||
|
let versionSpec = '9.99.9';
|
||||||
it('Acquires version of node with long paths', async () => {
|
inputs['node-version'] = versionSpec;
|
||||||
const toolpath = await installer.getNode('8.8.1');
|
|
||||||
const nodeDir = path.join(toolDir, 'node', '8.8.1', os.arch());
|
findSpy.mockImplementation(() => '');
|
||||||
|
await main.run();
|
||||||
expect(fs.existsSync(`${nodeDir}.complete`)).toBe(true);
|
|
||||||
if (isWindows) {
|
expect(logSpy).toHaveBeenCalledWith(
|
||||||
expect(fs.existsSync(path.join(nodeDir, 'node.exe'))).toBe(true);
|
'Not found in manifest. Falling back to download directly from Node'
|
||||||
} else {
|
);
|
||||||
expect(fs.existsSync(path.join(nodeDir, 'bin', 'node'))).toBe(true);
|
expect(logSpy).toHaveBeenCalledWith(
|
||||||
}
|
`Attempting to download ${versionSpec}...`
|
||||||
}, 100000);
|
);
|
||||||
|
expect(cnSpy).toHaveBeenCalledWith(
|
||||||
it('Uses version of node installed in cache', async () => {
|
`::error::Unable to find Node version '${versionSpec}' for platform ${os.platform} and architecture ${os.arch}.${osm.EOL}`
|
||||||
const nodeDir: string = path.join(toolDir, 'node', '250.0.0', os.arch());
|
);
|
||||||
await io.mkdirP(nodeDir);
|
});
|
||||||
fs.writeFileSync(`${nodeDir}.complete`, 'hello');
|
|
||||||
// This will throw if it doesn't find it in the cache (because no such version exists)
|
it('reports a failed download', async () => {
|
||||||
await installer.getNode('250.0.0');
|
let errMsg = 'unhandled download message';
|
||||||
return;
|
os.platform = 'linux';
|
||||||
});
|
os.arch = 'x64';
|
||||||
|
|
||||||
it('Doesnt use version of node that was only partially installed in cache', async () => {
|
// a version which is in the manifest
|
||||||
const nodeDir: string = path.join(toolDir, 'node', '251.0.0', os.arch());
|
let versionSpec = '12.16.2';
|
||||||
await io.mkdirP(nodeDir);
|
let resolvedVersion = versionSpec;
|
||||||
let thrown = false;
|
|
||||||
try {
|
inputs['node-version'] = versionSpec;
|
||||||
// This will throw if it doesn't find it in the cache (because no such version exists)
|
inputs['always-auth'] = false;
|
||||||
await installer.getNode('251.0.0');
|
inputs['token'] = 'faketoken';
|
||||||
} catch {
|
|
||||||
thrown = true;
|
findSpy.mockImplementation(() => '');
|
||||||
}
|
dlSpy.mockImplementation(() => {
|
||||||
expect(thrown).toBe(true);
|
throw new Error(errMsg);
|
||||||
return;
|
});
|
||||||
});
|
await main.run();
|
||||||
|
|
||||||
it('Resolves semantic versions of node installed in cache', async () => {
|
expect(cnSpy).toHaveBeenCalledWith(`::error::${errMsg}${osm.EOL}`);
|
||||||
const nodeDir: string = path.join(toolDir, 'node', '252.0.0', os.arch());
|
|
||||||
await io.mkdirP(nodeDir);
|
|
||||||
fs.writeFileSync(`${nodeDir}.complete`, 'hello');
|
|
||||||
// These will throw if it doesn't find it in the cache (because no such version exists)
|
|
||||||
await installer.getNode('252.0.0');
|
|
||||||
await installer.getNode('252');
|
|
||||||
await installer.getNode('252.0');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,41 @@
|
|||||||
|
import * as core from '@actions/core';
|
||||||
|
import * as installer from './installer';
|
||||||
|
import * as auth from './authutil';
|
||||||
|
import * as path from 'path';
|
||||||
|
|
||||||
|
export async function run() {
|
||||||
|
try {
|
||||||
|
//
|
||||||
|
// Version is optional. If supplied, install / use from the tool cache
|
||||||
|
// If not supplied then task is still used to setup proxy, auth, etc...
|
||||||
|
//
|
||||||
|
let version = core.getInput('node-version');
|
||||||
|
if (!version) {
|
||||||
|
version = core.getInput('version');
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`version: ${version}`);
|
||||||
|
if (version) {
|
||||||
|
let token = core.getInput('token');
|
||||||
|
let stable = (core.getInput('stable') || 'true').toUpperCase() === 'TRUE';
|
||||||
|
await installer.getNode(version, stable, token);
|
||||||
|
}
|
||||||
|
|
||||||
|
const registryUrl: string = core.getInput('registry-url');
|
||||||
|
const alwaysAuth: string = core.getInput('always-auth');
|
||||||
|
if (registryUrl) {
|
||||||
|
auth.configAuthentication(registryUrl, alwaysAuth);
|
||||||
|
}
|
||||||
|
|
||||||
|
const matchersPath = path.join(__dirname, '..', '.github');
|
||||||
|
console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
||||||
|
console.log(
|
||||||
|
`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`
|
||||||
|
);
|
||||||
|
console.log(
|
||||||
|
`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
core.setFailed(error.message);
|
||||||
|
}
|
||||||
|
}
|
@ -1,43 +1,3 @@
|
|||||||
import * as core from '@actions/core';
|
import {run} from './main';
|
||||||
import * as installer from './installer';
|
|
||||||
import * as auth from './authutil';
|
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
try {
|
|
||||||
//
|
|
||||||
// Version is optional. If supplied, install / use from the tool cache
|
|
||||||
// If not supplied then task is still used to setup proxy, auth, etc...
|
|
||||||
//
|
|
||||||
let version = core.getInput('node-version');
|
|
||||||
if (!version) {
|
|
||||||
version = core.getInput('version');
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`version: ${version}`);
|
|
||||||
if (version) {
|
|
||||||
let token = core.getInput('token');
|
|
||||||
let stable = (core.getInput('stable') || 'true').toUpperCase() === 'TRUE';
|
|
||||||
await installer.getNode(version, stable, token);
|
|
||||||
}
|
|
||||||
|
|
||||||
const registryUrl: string = core.getInput('registry-url');
|
|
||||||
const alwaysAuth: string = core.getInput('always-auth');
|
|
||||||
if (registryUrl) {
|
|
||||||
auth.configAuthentication(registryUrl, alwaysAuth);
|
|
||||||
}
|
|
||||||
|
|
||||||
const matchersPath = path.join(__dirname, '..', '.github');
|
|
||||||
console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
|
||||||
console.log(
|
|
||||||
`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`
|
|
||||||
);
|
|
||||||
console.log(
|
|
||||||
`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`
|
|
||||||
);
|
|
||||||
} catch (error) {
|
|
||||||
core.setFailed(error.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
Loading…
Reference in New Issue