Skip to content

Commit 4b6adb1

Browse files
committed
test: make assertion more resillient on older versions of node
1 parent 90d99a4 commit 4b6adb1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/dumper/dumper.spec.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
*/
99

1010
import { test } from '@japa/runner'
11+
import { fileURLToPath } from 'node:url'
1112
import { AppFactory } from '@adonisjs/application/factories'
12-
import { Dumper } from '../../modules/dumper/dumper.js'
13-
import { E_DUMP_DIE_EXCEPTION } from '../../modules/dumper/errors.js'
1413
import { HttpContextFactory } from '@adonisjs/http-server/factories'
14+
15+
import { Dumper } from '../../modules/dumper/dumper.js'
1516
import { AceFactory } from '../../factories/core/ace.js'
17+
import { E_DUMP_DIE_EXCEPTION } from '../../modules/dumper/errors.js'
1618

1719
test.group('Dumper', () => {
1820
test('dump and die', ({ fs }) => {
@@ -77,8 +79,8 @@ test.group('Dumper', () => {
7779
{
7880
title: 'DUMP DIE',
7981
source: {
80-
location: import.meta.filename,
81-
line: 68,
82+
location: fileURLToPath(new URL('', import.meta.url)),
83+
line: 70,
8284
},
8385
}
8486
)

0 commit comments

Comments
 (0)