Skip to content

Commit 4214cd3

Browse files
committed
update load to acornParse
1 parent 3784107 commit 4214cd3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/additional-comments.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/** @import { AdditionalComment } from '../src/languages/types.js' */
44
import { expect, test } from 'vitest';
55
import { print } from '../src/index.js';
6-
import { load } from './common.js';
6+
import { acornParse } from './common.js';
77
import ts from '../src/languages/ts/index.js';
88

99
/**
@@ -40,7 +40,7 @@ test('additional comments are inserted correctly', () => {
4040
return x;
4141
}`;
4242

43-
const { ast } = load(input);
43+
const { ast } = acornParse(input);
4444
const returnStatement = get_return_statement(ast);
4545
expect(returnStatement.type).toBe('ReturnStatement');
4646

@@ -66,7 +66,7 @@ test('additional comments are inserted correctly', () => {
6666

6767
test('only leading comments are inserted when specified', () => {
6868
const input = `function test() { return 42; }`;
69-
const { ast } = load(input);
69+
const { ast } = acornParse(input);
7070
const returnStatement = get_return_statement(ast);
7171

7272
/** @type {AdditionalComment[]} */
@@ -86,7 +86,7 @@ test('only leading comments are inserted when specified', () => {
8686

8787
test('only trailing comments are inserted when specified', () => {
8888
const input = `function test() { return 42; }`;
89-
const { ast } = load(input);
89+
const { ast } = acornParse(input);
9090
const returnStatement = get_return_statement(ast);
9191

9292
/** @type {AdditionalComment[]} */
@@ -110,7 +110,7 @@ test('additional comments multi-line comments have new line', () => {
110110
return x;
111111
}`;
112112

113-
const { ast } = load(input);
113+
const { ast } = acornParse(input);
114114
const returnStatement = get_return_statement(ast);
115115
expect(returnStatement.type).toBe('ReturnStatement');
116116

0 commit comments

Comments
 (0)