Skip to content

Commit 3f77dc7

Browse files
committed
Fix __dirname
1 parent 1d5d427 commit 3f77dc7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

__tests__/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { jest } from '@jest/globals'
22
import * as path from 'path'
3-
import url from 'url'
3+
import { fileURLToPath } from 'url'
44
import {expect} from '@jest/globals'
55
import * as core from '../__fixtures__/core.js'
66

@@ -10,7 +10,7 @@ const { run } = await import('../src/main.js')
1010

1111
// shows how the runner will run a javascript action with env / stdout protocol
1212
describe('main.ts', () => {
13-
const __dirname = path.dirname(url.fileURLToPath(import.meta.url))
13+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
1414

1515
beforeEach(() => {
1616
core.getBooleanInput.mockImplementation((name) => {

__tests__/parser.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import path from 'path'
2-
import url from 'url'
2+
import { fileURLToPath } from 'url'
33
import {expect} from '@jest/globals'
44
import {Annotation} from '../src/annotation.js'
55
import {parseXmls, parseXml} from '../src/parser.js'
66

77
describe('parser.ts', () => {
8-
const __dirname = path.dirname(url.fileURLToPath(import.meta.url))
8+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
99

1010
it('test parseXmls', () => {
1111
const file1 = path.join(__dirname, 'resource', 'lint-results.xml')

0 commit comments

Comments
 (0)