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

View file

@ -59,15 +59,11 @@ test('getThreadsFlag() should return the correct --threads flag', t => {
});
test('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);
});
test('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);
});