Simplify singleton tests by removing the loop

This commit is contained in:
Robin Neatherway 2020-06-26 15:11:00 +01:00
parent bb9ed79f3d
commit a0d4330434
3 changed files with 9 additions and 17 deletions

12
lib/util.test.js generated
View file

@ -54,15 +54,11 @@ ava_1.default('getThreadsFlag() should return the correct --threads flag', t =>
}
});
ava_1.default('getThreadsFlag() throws if the ram input is < 0 or NaN', t => {
for (const input of ["hello!"]) {
process.env['INPUT_THREADS'] = input;
t.throws(util.getThreadsFlag);
}
process.env['INPUT_THREADS'] = "hello!";
t.throws(util.getThreadsFlag);
});
ava_1.default('getRef() throws on the empty string', t => {
for (const input of [""]) {
process.env["GITHUB_REF"] = input;
t.throws(util.getRef);
}
process.env["GITHUB_REF"] = "";
t.throws(util.getRef);
});
//# sourceMappingURL=util.test.js.map