@@ -93,7 +93,7 @@ describe("channel plugin module loader helpers", () => {
9393 expect ( createJiti ) . not . toHaveBeenCalled ( ) ;
9494 } ) ;
9595
96- it ( "uses the runtime-supported Jiti boundary for Windows dist loads" , async ( ) => {
96+ it ( "creates the runtime-supported Jiti boundary for Windows dist loads" , async ( ) => {
9797 const createJiti = vi . fn ( ( ) => vi . fn ( ( ) => ( { ok : true } ) ) ) ;
9898 vi . doMock ( "jiti" , ( ) => ( {
9999 createJiti,
@@ -108,15 +108,15 @@ describe("channel plugin module loader helpers", () => {
108108 const rootDir = createTempDir ( ) ;
109109 const modulePath = path . join ( rootDir , "dist" , "extensions" , "demo" , "index.js" ) ;
110110 fs . mkdirSync ( path . dirname ( modulePath ) , { recursive : true } ) ;
111- fs . writeFileSync ( modulePath , "export {} ;\n" , "utf8" ) ;
111+ fs . writeFileSync ( modulePath , "export const ok = true ;\n" , "utf8" ) ;
112112
113- expect (
114- loaderModule . loadChannelPluginModule ( {
115- modulePath ,
116- rootDir ,
117- shouldTryNativeRequire : ( ) => false ,
118- } ) ,
119- ) . toEqual ( { ok : true } ) ;
113+ const loaded = loaderModule . loadChannelPluginModule ( {
114+ modulePath ,
115+ rootDir ,
116+ shouldTryNativeRequire : ( ) => false ,
117+ } ) ;
118+
119+ expect ( loaded ) . toMatchObject ( { ok : true } ) ;
120120 expect ( createJiti ) . toHaveBeenCalledWith (
121121 expect . any ( String ) ,
122122 expect . objectContaining ( {
0 commit comments