Skip to content

Commit d0cf53d

Browse files
committed
Fix tests to await
1 parent 11a30eb commit d0cf53d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

__tests__/parser.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { parseXmls, parseXml } from '../src/parser.js'
77
describe('parser.ts', () => {
88
const __dirname = path.dirname(fileURLToPath(import.meta.url))
99

10-
it('test parseXmls', () => {
10+
it('test parseXmls', async () => {
1111
const file1 = path.join(__dirname, 'resource', 'lint-results.xml')
1212
const file2 = path.join(__dirname, 'resource', 'empty-results.xml')
1313

@@ -26,13 +26,13 @@ describe('parser.ts', () => {
2626
44
2727
)
2828

29-
expect(parseXmls([file1, file2], false)).resolves.toEqual([
29+
await expect(parseXmls([file1, file2], false)).resolves.toEqual([
3030
annotation1,
3131
annotation2
3232
])
3333
})
3434

35-
it('test parseXmls and ignore warnings', () => {
35+
it('test parseXmls and ignore warnings', async () => {
3636
const file1 = path.join(__dirname, 'resource', 'lint-results.xml')
3737
const file2 = path.join(__dirname, 'resource', 'empty-results.xml')
3838

@@ -44,10 +44,10 @@ describe('parser.ts', () => {
4444
44
4545
)
4646

47-
expect(parseXmls([file1, file2], true)).resolves.toEqual([annotation2])
47+
await expect(parseXmls([file1, file2], true)).resolves.toEqual([annotation2])
4848
})
4949

50-
it('test parseXml with issues', () => {
50+
it('test parseXml with issues', async () => {
5151
const xml = `<?xml version="1.0" encoding="UTF-8"?>
5252
<issues format="6" by="lint 7.2.1">
5353
<issue
@@ -74,14 +74,14 @@ describe('parser.ts', () => {
7474
44
7575
)
7676

77-
expect(parseXml(xml, false)).resolves.toEqual([annotation])
77+
await expect(parseXml(xml, false)).resolves.toEqual([annotation])
7878
})
7979

80-
it('test parseXml without issue', () => {
80+
it('test parseXml without issue', async () => {
8181
const xml = `<?xml version="1.0" encoding="UTF-8"?>
8282
<issues format="6" by="lint 7.2.1">
8383
</issues>`
8484

85-
expect(parseXml(xml, false)).resolves.toEqual([])
85+
await expect(parseXml(xml, false)).resolves.toEqual([])
8686
})
8787
})

0 commit comments

Comments
 (0)