webpack/test/configCases/library/cjs-static/index.js

11 lines
280 B
JavaScript
Raw Normal View History

2025-02-26 20:11:22 +08:00
const fs = require("fs")
export const foo1 = () => {}
export const foo2 = () => {}
const bar = "bar";
export default bar
it("should success compile and work",()=>{
const output = fs.readFileSync(__filename).toString();
expect(output.match(/exports(\[|\.)/g).length).toBe(3)
})