Skip to content

Commit 58fe197

Browse files
committed
test(unit): properly await execution that is expected to reject
1 parent a984871 commit 58fe197

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lockfile-lint/scaffolder.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe('lockfile linting scaffolder', () => {
7777
it('should throw an error for unsupported package managers', async () => {
7878
const packageManager = any.word();
7979

80-
expect(scaffoldLockfileLint({projectRoot, packageManager})).rejects.toThrowError(
80+
await expect(scaffoldLockfileLint({projectRoot, packageManager})).rejects.toThrowError(
8181
`The ${packageManager} package manager is currently not supported by lockfile-lint. `
8282
+ `Only ${lockfileLintSupportedPackageManagers.join(' and ')} are currently supported.`
8383
);

0 commit comments

Comments
 (0)