Initial Commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from "@suaveplan/testing/runner";
|
||||
|
||||
describe("tree-shake", () => {
|
||||
it("has sideEffects false", { timeout: 5000 }, async () => {
|
||||
const pkg = await import("../package.json");
|
||||
expect(pkg.default.sideEffects).toBe(false);
|
||||
});
|
||||
|
||||
it("has at least one subpath export", { timeout: 5000 }, async () => {
|
||||
const pkg = await import("../package.json");
|
||||
const exports = Object.keys(pkg.default.exports || {});
|
||||
expect(exports.length).toBeGreaterThanOrEqual(2);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user