Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ee0961d

Browse files
committed
eslint fixes
1 parent 202dbf4 commit ee0961d

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

e2e/native-esm-cjs-require/__tests__/cjs-esm-interop.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
*/
77

88
import greet, {helper} from '../babel-style-default.cjs';
9-
import plainDefault, {value, multiply} from '../plain-cjs.cjs';
10-
import {increment as incA, getCount as countA} from '../importer-a.mjs';
11-
import {increment as incB, getCount as countB} from '../importer-b.mjs';
9+
import plainDefault, {multiply, value} from '../plain-cjs.cjs';
10+
import {getCount as countA, increment as incA} from '../importer-a.mjs';
11+
import {getCount as countB, increment as incB} from '../importer-b.mjs';
1212

1313
// ── __esModule interop ────────────────────────────────────────────────────────
1414

@@ -30,7 +30,7 @@ test('__esModule key is not exposed as a named export', async () => {
3030
// ── plain CJS (no __esModule flag) ───────────────────────────────────────────
3131

3232
test('default import of plain CJS is the whole module.exports object', () => {
33-
expect(plainDefault).toEqual({value: 99, multiply: expect.any(Function)});
33+
expect(plainDefault).toEqual({multiply: expect.any(Function), value: 99});
3434
});
3535

3636
test('named imports from plain CJS work', () => {

e2e/native-esm-cjs-require/plain-cjs.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77

88
// Plain CJS without __esModule — default export should be the whole module.exports.
99
'use strict';
10+
1011
module.exports = {
11-
value: 99,
1212
multiply(a, b) {
1313
return a * b;
1414
},
15+
value: 99,
1516
};

0 commit comments

Comments
 (0)