Skip to content

Commit 7263194

Browse files
committed
test: make opt-arg output a less ridiculous amount of logging
1 parent be0345f commit 7263194

1 file changed

Lines changed: 20 additions & 13 deletions

File tree

test/opt-arg.ts

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ t.test('every kind of invalid option value', t => {
4747
) {
4848
continue
4949
}
50-
t.throws(() =>
50+
try {
5151
oa({
5252
//@ts-expect-error
5353
preserveRoot,
@@ -61,8 +61,16 @@ t.test('every kind of invalid option value', t => {
6161
maxBackoff,
6262
//@ts-expect-error
6363
tmp,
64-
}),
65-
)
64+
})
65+
t.fail('expected throw for invalid options', {
66+
preserveRoot,
67+
maxRetries,
68+
retryDelay,
69+
backoff,
70+
maxBackoff,
71+
tmp,
72+
})
73+
} catch (_) {}
6674
}
6775
}
6876
}
@@ -84,16 +92,15 @@ t.test('test every allowed combination', t => {
8492
for (const retryDelay of goodNum) {
8593
for (const backoff of goodNum) {
8694
for (const maxBackoff of goodNum) {
87-
t.ok(
88-
oa({
89-
preserveRoot,
90-
maxRetries,
91-
retryDelay,
92-
backoff,
93-
maxBackoff,
94-
tmp,
95-
}),
96-
)
95+
// just verify it doesn't throw
96+
oa({
97+
preserveRoot,
98+
maxRetries,
99+
retryDelay,
100+
backoff,
101+
maxBackoff,
102+
tmp,
103+
})
97104
}
98105
}
99106
}

0 commit comments

Comments
 (0)