Skip to content

Commit a0d4330

Browse files
committed
Simplify singleton tests by removing the loop
1 parent bb9ed79 commit a0d4330

3 files changed

Lines changed: 9 additions & 17 deletions

File tree

lib/util.test.js

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/util.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/util.test.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,11 @@ test('getThreadsFlag() should return the correct --threads flag', t => {
5959
});
6060

6161
test('getThreadsFlag() throws if the ram input is < 0 or NaN', t => {
62-
for (const input of ["hello!"]) {
63-
process.env['INPUT_THREADS'] = input;
64-
t.throws(util.getThreadsFlag);
65-
}
62+
process.env['INPUT_THREADS'] = "hello!";
63+
t.throws(util.getThreadsFlag);
6664
});
6765

6866
test('getRef() throws on the empty string', t => {
69-
for (const input of [""]) {
70-
process.env["GITHUB_REF"] = input;
71-
t.throws(util.getRef);
72-
}
67+
process.env["GITHUB_REF"] = "";
68+
t.throws(util.getRef);
7369
});

0 commit comments

Comments
 (0)