chore: disable sanitizers in esbuild tests (#2461)
This commit is contained in:
+36
-31
@@ -3,39 +3,44 @@ import * as path from "@std/path";
|
|||||||
import { Builder } from "./builder.ts";
|
import { Builder } from "./builder.ts";
|
||||||
import { App } from "../app.ts";
|
import { App } from "../app.ts";
|
||||||
|
|
||||||
Deno.test("Builder - chain onTransformStaticFile", async () => {
|
Deno.test({
|
||||||
const logs: string[] = [];
|
name: "Builder - chain onTransformStaticFile",
|
||||||
const builder = new Builder();
|
fn: async () => {
|
||||||
builder.onTransformStaticFile(
|
const logs: string[] = [];
|
||||||
{ pluginName: "A", filter: /\.css$/ },
|
const builder = new Builder();
|
||||||
() => {
|
builder.onTransformStaticFile(
|
||||||
logs.push("A");
|
{ pluginName: "A", filter: /\.css$/ },
|
||||||
},
|
() => {
|
||||||
);
|
logs.push("A");
|
||||||
builder.onTransformStaticFile(
|
},
|
||||||
{ pluginName: "B", filter: /\.css$/ },
|
);
|
||||||
() => {
|
builder.onTransformStaticFile(
|
||||||
logs.push("B");
|
{ pluginName: "B", filter: /\.css$/ },
|
||||||
},
|
() => {
|
||||||
);
|
logs.push("B");
|
||||||
builder.onTransformStaticFile(
|
},
|
||||||
{ pluginName: "C", filter: /\.css$/ },
|
);
|
||||||
() => {
|
builder.onTransformStaticFile(
|
||||||
logs.push("C");
|
{ pluginName: "C", filter: /\.css$/ },
|
||||||
},
|
() => {
|
||||||
);
|
logs.push("C");
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
const tmp = await Deno.makeTempDir();
|
const tmp = await Deno.makeTempDir();
|
||||||
await Deno.writeTextFile(path.join(tmp, "foo.css"), "body { color: red; }");
|
await Deno.writeTextFile(path.join(tmp, "foo.css"), "body { color: red; }");
|
||||||
const app = new App({
|
const app = new App({
|
||||||
staticDir: tmp,
|
staticDir: tmp,
|
||||||
build: {
|
build: {
|
||||||
outDir: path.join(tmp, "dist"),
|
outDir: path.join(tmp, "dist"),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
await builder.build(app);
|
await builder.build(app);
|
||||||
|
|
||||||
expect(logs).toEqual(["A", "B", "C"]);
|
expect(logs).toEqual(["A", "B", "C"]);
|
||||||
|
},
|
||||||
|
sanitizeOps: false,
|
||||||
|
sanitizeResources: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|||||||
Reference in New Issue
Block a user