fix: treat default
condition as esm or cjs
#1697
Annotations
3 errors
Test:
test/testing-utils/helpers.ts#L73
AssertionError: expected 'var core_js = require(\'./core.js\');…' to match /core.dev.js/
- Expected:
/core.dev.js/
+ Received:
"var core_js = require('./core.js');
const value = 'index';
exports.value = value;
Object.keys(core_js).forEach(function (k) {
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
enumerable: true,
get: function () { return core_js[k]; }
});
});
"
❯ test/testing-utils/helpers.ts:73:25
❯ assertFilesContent test/testing-utils/helpers.ts:81:3
❯ test/integration/dev-prod-convention-reexport/index.test.ts:8:5
|
Test:
test/testing-utils/helpers.ts#L75
AssertionError: expected 'var a_edgeLight_js = require(\'./a.ed…' to contain 'var a_cjs = require(\'./a.cjs\');'
- Expected
+ Received
- var a_cjs = require('./a.cjs');
+ var a_edgeLight_js = require('./a.edge-light.js');
+
+
+
+ Object.keys(a_edgeLight_js).forEach(function (k) {
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function () { return a_edgeLight_js[k]; }
+ });
+ });
+
❯ test/testing-utils/helpers.ts:75:25
❯ assertFilesContent test/testing-utils/helpers.ts:81:3
❯ test/integration/exports-order/index.test.ts:27:5
|
Test
Process completed with exit code 1.
|
Loading