Skip to content

Commit 54f8ff5

Browse files
backflipmarionebl
authored andcommitted
chore: fixed some async tests in config-lerna-scopes
1 parent ab258e8 commit 54f8ff5

File tree

1 file changed

+12
-2
lines changed
  • @commitlint/config-lerna-scopes

1 file changed

+12
-2
lines changed

@commitlint/config-lerna-scopes/test.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ test('scope-enum is function', t => {
2121

2222
test('scope-enum does not throw for missing context', async t => {
2323
const {'scope-enum': fn} = config.rules;
24-
await t.notThrows(async () => fn());
24+
try {
25+
await fn();
26+
t.pass();
27+
} catch (err) {
28+
t.fail();
29+
}
2530
});
2631

2732
test('scope-enum has expected severity', async t => {
@@ -55,7 +60,12 @@ test.failing(
5560
async t => {
5661
const {'scope-enum': fn} = config.rules;
5762
const cwd = await npm.bootstrap('fixtures/version-mismatch');
58-
await t.throws(async () => fn({cwd}));
63+
try {
64+
await fn({cwd});
65+
t.fail();
66+
} catch (err) {
67+
t.pass();
68+
}
5969
}
6070
);
6171

0 commit comments

Comments
 (0)