diff --git a/lib/util.test.js b/lib/util.test.js index fa6a5e97c8..6f70d3b462 100644 --- a/lib/util.test.js +++ b/lib/util.test.js @@ -53,7 +53,7 @@ ava_1.default('getThreadsFlag() should return the correct --threads flag', t => t.deepEqual(flag, expectedFlag); } }); -ava_1.default('getThreadsFlag() throws if the ram input is < 0 or NaN', t => { +ava_1.default('getThreadsFlag() throws if the threads input is not an integer', t => { process.env['INPUT_THREADS'] = "hello!"; t.throws(util.getThreadsFlag); }); diff --git a/lib/util.test.js.map b/lib/util.test.js.map index 7deffbda88..61b4a8b60d 100644 --- a/lib/util.test.js.map +++ b/lib/util.test.js.map @@ -1 +1 @@ -{"version":3,"file":"util.test.js","sourceRoot":"","sources":["../src/util.test.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAuB;AACvB,uCAAyB;AACzB,uCAAyB;AAEzB,mDAAmD;AACnD,6CAA+B;AAE/B,kCAAkB,CAAC,aAAI,CAAC,CAAC;AAEzB,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACvB,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,GAAG,mCAAmC,EAAE,MAAM,CAAC,CAAC;IACvF,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,+BAA+B,EAAE,QAAQ,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,sDAAsD,EAAE,CAAC,CAAC,EAAE;IAE/D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IAE3D,MAAM,KAAK,GAAG;QACZ,EAAE,EAAE,SAAS,QAAQ,GAAG,GAAG,EAAE;QAC7B,KAAK,EAAE,WAAW;KACnB,CAAC;IAEF,KAAK,MAAM,CAAC,KAAK,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AAO,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC;IACxC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAChC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,qCAAqC,EAAE,CAAC,CAAC,EAAE;IAC9C,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;IAC/B,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/src/util.test.ts b/src/util.test.ts index 428f8e5abe..a47732fc6c 100644 --- a/src/util.test.ts +++ b/src/util.test.ts @@ -58,7 +58,7 @@ test('getThreadsFlag() should return the correct --threads flag', t => { } }); -test('getThreadsFlag() throws if the ram input is < 0 or NaN', t => { +test('getThreadsFlag() throws if the threads input is not an integer', t => { process.env['INPUT_THREADS'] = "hello!"; t.throws(util.getThreadsFlag); });