Initial Commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { describe, expect, it } from "@suaveplan/testing/runner";
|
||||
|
||||
describe("dep-graph", () => {
|
||||
it("only depends on allowed @suaveplan packages", {
|
||||
timeout: 5000,
|
||||
}, async () => {
|
||||
const pkg = await import("../package.json");
|
||||
const deps = Object.keys(pkg.default.dependencies || {});
|
||||
const allowed = ["@suaveplan/colours"];
|
||||
for (const dep of deps) {
|
||||
if (dep.startsWith("@suaveplan/")) {
|
||||
expect(allowed).toContain(dep);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
// no polyfills needed
|
||||
@@ -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