@@ -25,7 +25,7 @@ function testWithGeneratedFixture (ext, code) {
25
25
const expected = readFileSync ( expectedFilepath ) . toString ( ) ;
26
26
27
27
function deftest ( name , fun ) {
28
- it ( `${ name } : ${ code } ` , function ( ) {
28
+ it ( `${ name } : ${ code } ` , ( ) => {
29
29
const ast = createFixture ( { code, postlude, prelude } ) ;
30
30
const modifiedAst = fun ( ast ) ;
31
31
const actual = generate ( modifiedAst ) ;
@@ -50,7 +50,7 @@ function testWithFixture (fixtureName, options) {
50
50
const expected = readFileSync ( expectedFilepath ) . toString ( ) ;
51
51
52
52
function deftest ( name , fun ) {
53
- it ( `${ name } : ${ fixtureName } ` , function ( ) {
53
+ it ( `${ name } : ${ fixtureName } ` , ( ) => {
54
54
const ast = parseFixture ( fixtureFilepath ) ;
55
55
const modifiedAst = fun ( ast ) ;
56
56
const actual = generate ( modifiedAst ) ;
@@ -68,7 +68,7 @@ describe('with default options', () => {
68
68
testWithFixture ( 'assignment_singlevar' ) ;
69
69
testWithFixture ( 'non_block_statement' ) ;
70
70
71
- describe ( 'removal of ESM imports' , function ( ) {
71
+ describe ( 'removal of ESM imports' , ( ) => {
72
72
testESM ( "import assert from 'assert';" ) ;
73
73
testESM ( "import assert from 'node:assert';" ) ;
74
74
testESM ( "import assert from 'node:assert/strict';" ) ;
@@ -83,7 +83,7 @@ describe('with default options', () => {
83
83
testESM ( "import { default as assert } from 'node:assert';" ) ;
84
84
} ) ;
85
85
86
- describe ( 'removal of CJS requires' , function ( ) {
86
+ describe ( 'removal of CJS requires' , ( ) => {
87
87
testCJS ( "const assert = require('assert');" ) ;
88
88
testCJS ( "const assert = require('assert').strict;" ) ;
89
89
testCJS ( "const assert = require('assert/strict');" ) ;
@@ -97,17 +97,13 @@ describe('with default options', () => {
97
97
98
98
describe ( 'with custom options' , ( ) => {
99
99
testWithFixture ( 'custom_modules_cjs' , {
100
- variables : [
101
- ] ,
102
100
modules : [
103
101
'http-assert' ,
104
102
'node:assert'
105
103
]
106
104
} ) ;
107
105
108
106
testWithFixture ( 'custom_modules_mjs' , {
109
- variables : [
110
- ] ,
111
107
modules : [
112
108
'node:assert' ,
113
109
'node:assert/strict' ,
0 commit comments