Turbopack: expose used export info in tests (#86037)
This will allow us to reuse more Webpack tests soon
```js
module.exports = [
"[project]/turbopack/crates/turbopack-tests/tests/execution/turbopack/code-gen/exports-info/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
// MERGED MODULE: [project]/turbopack/crates/turbopack-tests/tests/execution/turbopack/code-gen/exports-info/input/module.js [test] (ecmascript)
;
const __TURBOPACK__$5f$_webpack_exports_info_$5f$__ = {
"bar": {
used: false
},
"foo": {
used: true
},
"usage": {
used: true
}
};
const foo = 'foo';
const bar = 'bar';
const usage = __TURBOPACK__$5f$_webpack_exports_info_$5f$__;
// MERGED MODULE: [project]/turbopack/crates/turbopack-tests/tests/execution/turbopack/code-gen/exports-info/input/index.js [test] (ecmascript)
;
;
it('should expose __webpack_exports_info__ in tests', ()=>{
expect(foo).toBe('foo');
expect(usage.foo.used).toBe(true);
expect(usage.bar.used).toBe(false);
expect(usage.usage.used).toBe(true);
});
__turbopack_context__.s([], "[project]/turbopack/crates/turbopack-tests/tests/execution/turbopack/code-gen/exports-info/input/index.js [test] (ecmascript)");
}),
];
```
Showing
Please
register
or
sign in
to comment