Skip to content

Commit

Permalink
Await async assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
frandiox committed May 7, 2024
1 parent 3fbd5bc commit 52112aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/cli/src/lib/file.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,29 @@ describe('File utils', () => {
await mkdir(resolvePath(tmpDir, 'fifth'));
await writeFile(resolvePath(tmpDir, 'fifth', 'index.ts'), 'content');

expect(findFileWithExtension(tmpDir, 'first')).resolves.toEqual({
await expect(findFileWithExtension(tmpDir, 'first')).resolves.toEqual({
filepath: expect.stringMatching(/first\.js$/),
extension: 'js',
astType: 'js',
});

expect(findFileWithExtension(tmpDir, 'second')).resolves.toEqual({
await expect(findFileWithExtension(tmpDir, 'second')).resolves.toEqual({
filepath: expect.stringMatching(/second\.tsx$/),
extension: 'tsx',
astType: 'tsx',
});

expect(findFileWithExtension(tmpDir, 'third')).resolves.toEqual({
await expect(findFileWithExtension(tmpDir, 'third')).resolves.toEqual({
filepath: expect.stringMatching(/third\.mjs$/),
extension: 'mjs',
astType: 'js',
});

expect(findFileWithExtension(tmpDir, 'fourth')).resolves.toEqual({
await expect(findFileWithExtension(tmpDir, 'fourth')).resolves.toEqual({
filepath: expect.stringMatching(/fourth$/),
});

expect(findFileWithExtension(tmpDir, 'fifth')).resolves.toEqual({
await expect(findFileWithExtension(tmpDir, 'fifth')).resolves.toEqual({
filepath: expect.stringMatching(/fifth\/index\.ts$/),
extension: 'ts',
astType: 'ts',
Expand Down

0 comments on commit 52112aa

Please sign in to comment.