refactor: migrate legacy wire namespace to wrn
This commit is contained in:
@@ -3,8 +3,8 @@ import { mkdtempSync, rmSync, utimesSync, writeFileSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import {
|
||||
compileWireArtifacts,
|
||||
compileWireArtifactsAsync,
|
||||
compileWrnArtifacts,
|
||||
compileWrnArtifactsAsync,
|
||||
getWrnCompileMetrics,
|
||||
invalidateModule,
|
||||
loadModule,
|
||||
@@ -32,7 +32,7 @@ test("development compilation awaits plugin AST and code transforms", async () =
|
||||
});
|
||||
try {
|
||||
writeFileSync(file, "page Home { view { <h1>Plugin</h1> } }\n");
|
||||
const artifact = await compileWireArtifactsAsync(file);
|
||||
const artifact = await compileWrnArtifactsAsync(file);
|
||||
expect(astTransformed).toBeTrue();
|
||||
expect((await import(artifact.main)).pluginTransformed).toBeTrue();
|
||||
} finally {
|
||||
@@ -48,10 +48,10 @@ test("WRN compilation exposes cache hit, miss, timing, and error metrics", () =>
|
||||
resetWrnCompileMetrics();
|
||||
try {
|
||||
writeFileSync(file, "page Home { view { <h1>Metrics</h1> } }\n");
|
||||
compileWireArtifacts(file);
|
||||
compileWireArtifacts(file);
|
||||
compileWrnArtifacts(file);
|
||||
compileWrnArtifacts(file);
|
||||
writeFileSync(file, "page Broken { view { <h1> } }\n");
|
||||
expect(() => compileWireArtifacts(file)).toThrow();
|
||||
expect(() => compileWrnArtifacts(file)).toThrow();
|
||||
expect(getWrnCompileMetrics()).toMatchObject({
|
||||
hits: 1,
|
||||
misses: 2,
|
||||
|
||||
Reference in New Issue
Block a user