feat: add plugin configResolved (#2055)
This commit is contained in:
@@ -151,6 +151,9 @@ Deno.test("calls buildStart() and buildEnd()", async () => {
|
||||
);
|
||||
|
||||
assertEquals(out, [
|
||||
"Plugin a: configResolved",
|
||||
"Plugin b: configResolved",
|
||||
"Plugin c: configResolved",
|
||||
"Plugin a: buildStart",
|
||||
"Plugin b: buildStart",
|
||||
`Plugin c: ${join("tests", "fixture_plugin_lifecycle", "_fresh")}`,
|
||||
@@ -159,6 +162,18 @@ Deno.test("calls buildStart() and buildEnd()", async () => {
|
||||
]);
|
||||
});
|
||||
|
||||
Deno.test("calls configResolved() in dev", async () => {
|
||||
await withFakeServe(
|
||||
"./tests/fixture_plugin_resolved_dev/dev.ts",
|
||||
async (server) => {
|
||||
const res = await server.get("/");
|
||||
await res.text();
|
||||
assertEquals(res.headers.get("X-Plugin-A"), "true");
|
||||
},
|
||||
{ loadConfig: true },
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test("plugin script doesn't halt island execution", async () => {
|
||||
await withPageName(
|
||||
"./tests/fixture_plugin_error/main.ts",
|
||||
|
||||
Reference in New Issue
Block a user