@@ -9,7 +9,7 @@ describe('Should load config file correctly', () => {
99 test ( 'Load config.js in cjs project' , async ( ) => {
1010 const fixtureDir = join ( __dirname , 'fixtures/config/cjs' ) ;
1111 const configFilePath = join ( fixtureDir , 'rslib.config.js' ) ;
12- const config = await loadConfig ( { path : configFilePath } ) ;
12+ const { content : config } = await loadConfig ( { path : configFilePath } ) ;
1313 expect ( config ) . toEqual ( {
1414 lib : [ ] ,
1515 source : {
@@ -26,7 +26,7 @@ describe('Should load config file correctly', () => {
2626 test ( 'Load config.mjs in cjs project' , async ( ) => {
2727 const fixtureDir = join ( __dirname , 'fixtures/config/cjs' ) ;
2828 const configFilePath = join ( fixtureDir , 'rslib.config.mjs' ) ;
29- const config = await loadConfig ( { path : configFilePath } ) ;
29+ const { content : config } = await loadConfig ( { path : configFilePath } ) ;
3030 expect ( config ) . toEqual ( {
3131 lib : [ ] ,
3232 source : {
@@ -43,7 +43,7 @@ describe('Should load config file correctly', () => {
4343 test ( 'Load config.ts in cjs project' , async ( ) => {
4444 const fixtureDir = join ( __dirname , 'fixtures/config/cjs' ) ;
4545 const configFilePath = join ( fixtureDir , 'rslib.config.ts' ) ;
46- const config = await loadConfig ( { path : configFilePath } ) ;
46+ const { content : config } = await loadConfig ( { path : configFilePath } ) ;
4747 expect ( config ) . toEqual ( {
4848 lib : [ ] ,
4949 source : {
@@ -60,7 +60,7 @@ describe('Should load config file correctly', () => {
6060 test ( 'Load config.cjs with defineConfig in cjs project' , async ( ) => {
6161 const fixtureDir = join ( __dirname , 'fixtures/config/cjs' ) ;
6262 const configFilePath = join ( fixtureDir , 'rslib.config.cjs' ) ;
63- const config = await loadConfig ( { path : configFilePath } ) ;
63+ const { content : config } = await loadConfig ( { path : configFilePath } ) ;
6464 expect ( config ) . toEqual ( {
6565 lib : [ ] ,
6666 source : {
@@ -77,7 +77,7 @@ describe('Should load config file correctly', () => {
7777 test ( 'Load config.js in esm project' , async ( ) => {
7878 const fixtureDir = join ( __dirname , 'fixtures/config/esm' ) ;
7979 const configFilePath = join ( fixtureDir , 'rslib.config.js' ) ;
80- const config = await loadConfig ( { path : configFilePath } ) ;
80+ const { content : config } = await loadConfig ( { path : configFilePath } ) ;
8181 expect ( config ) . toEqual ( {
8282 lib : [ ] ,
8383 source : {
@@ -94,7 +94,7 @@ describe('Should load config file correctly', () => {
9494 test ( 'Load config.cjs in esm project' , async ( ) => {
9595 const fixtureDir = join ( __dirname , 'fixtures/config/esm' ) ;
9696 const configFilePath = join ( fixtureDir , 'rslib.config.cjs' ) ;
97- const config = await loadConfig ( { path : configFilePath } ) ;
97+ const { content : config } = await loadConfig ( { path : configFilePath } ) ;
9898 expect ( config ) . toEqual ( {
9999 lib : [ ] ,
100100 source : {
@@ -111,7 +111,7 @@ describe('Should load config file correctly', () => {
111111 test ( 'Load config.ts in esm project' , async ( ) => {
112112 const fixtureDir = join ( __dirname , 'fixtures/config/esm' ) ;
113113 const configFilePath = join ( fixtureDir , 'rslib.config.ts' ) ;
114- const config = await loadConfig ( { path : configFilePath } ) ;
114+ const { content : config } = await loadConfig ( { path : configFilePath } ) ;
115115 expect ( config ) . toEqual ( {
116116 lib : [ ] ,
117117 source : {
@@ -128,7 +128,7 @@ describe('Should load config file correctly', () => {
128128 test ( 'Load config.mjs with defineConfig in esm project' , async ( ) => {
129129 const fixtureDir = join ( __dirname , 'fixtures/config/esm' ) ;
130130 const configFilePath = join ( fixtureDir , 'rslib.config.mjs' ) ;
131- const config = await loadConfig ( { path : configFilePath } ) ;
131+ const { content : config } = await loadConfig ( { path : configFilePath } ) ;
132132 expect ( config ) . toMatchObject ( {
133133 lib : [ ] ,
134134 source : {
0 commit comments