You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// happy-domimport{GlobalRegistrator}from'@happy-dom/global-registrator';GlobalRegistrator.register();// global test lifecycle hooksimport{cleanup}from'@testing-library/react'import{beforeAll,beforeEach,afterEach,afterAll}from"bun:test";beforeAll(()=>{console.log('before all, only run once')})afterEach(()=>{console.log('after each')cleanup()})// custom loader for any file type, for test stubconststubLessPlugin={name: "less loader",asyncsetup(build){const{ readFileSync }=awaitimport("fs");// implementationbuild.onLoad({filter: /\.(less)$/},(args)=>{consttext=readFileSync(args.path,"utf8");console.log('text\n',text,'\n',args.path);constexports={};// and returns it as a modulereturn{
exports,loader: "object",// special loader for JS objects};});},};Bun.plugin(stubLessPlugin);
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: