Skip to content

Commit bfadd7f

Browse files
committed
chore: update
1 parent 46c24ce commit bfadd7f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

packages/core/tests/config.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,22 @@ describe('Should compose create Rsbuild config correctly', () => {
224224
const rslibConfig: RslibConfig = {
225225
lib: [
226226
{
227+
format: 'esm',
227228
output: {
228229
distPath: 'dist/esm',
229230
},
230231
},
232+
{
233+
format: 'cjs',
234+
output: {
235+
distPath: {
236+
root: 'dist/cjs',
237+
},
238+
},
239+
},
231240
],
232241
};
242+
233243
const composedRsbuildConfig = await composeCreateRsbuildConfig(rslibConfig);
234244
expect(
235245
composedRsbuildConfig[0]?.config.output?.distPath,
@@ -242,6 +252,17 @@ describe('Should compose create Rsbuild config correctly', () => {
242252
"root": "dist/esm",
243253
}
244254
`);
255+
expect(
256+
composedRsbuildConfig[1]?.config.output?.distPath,
257+
).toMatchInlineSnapshot(`
258+
{
259+
"css": "./",
260+
"cssAsync": "./",
261+
"js": "./",
262+
"jsAsync": "./",
263+
"root": "dist/cjs",
264+
}
265+
`);
245266
});
246267
});
247268

0 commit comments

Comments
 (0)