Skip to content

Commit 1c698d7

Browse files
committed
Fix line endings
1 parent 0ca6fe9 commit 1c698d7

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

codemods/transformTestUtils.ts

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { globbySync } from 'globby'
22
import type { Transform } from 'jscodeshift'
33
import type { TestOptions } from 'jscodeshift/src/testUtils'
4-
import { runInlineTest } from 'jscodeshift/src/testUtils'
4+
import { applyTransform } from 'jscodeshift/src/testUtils'
55
import fs from 'node:fs'
66
import path from 'node:path'
77

@@ -41,33 +41,29 @@ export const runTransformTest = (
4141

4242
describe(`${testName}${extension}`, () => {
4343
it('transforms correctly', () => {
44-
runInlineTest(
44+
const output = applyTransform(
4545
transform,
4646
{},
4747
{
4848
path: testInputPath,
4949
source: inputFileContent,
5050
},
51-
expectedOutput,
52-
{
53-
parser,
54-
},
51+
{ parser },
5552
)
53+
expect(output).toBe(expectedOutput.trim())
5654
})
5755

5856
it('is idempotent', () => {
59-
runInlineTest(
57+
const output = applyTransform(
6058
transform,
6159
{},
6260
{
6361
path: testInputPath,
6462
source: inputFileContent,
6563
},
66-
expectedOutput,
67-
{
68-
parser,
69-
},
64+
{ parser },
7065
)
66+
expect(output).toBe(expectedOutput.trim())
7167
})
7268
})
7369
})

0 commit comments

Comments
 (0)