feat: add plugin buildStart and buildEnd hooks (#1770)

This commit is contained in:
Marvin Hagemeister
2023-09-18 17:46:34 +02:00
committed by GitHub
parent d94d3db4aa
commit c76f15479f
11 changed files with 161 additions and 15 deletions
+2 -13
View File
@@ -1,4 +1,4 @@
import { colors, join } from "../src/server/deps.ts";
import { join } from "../src/server/deps.ts";
import {
assert,
assertEquals,
@@ -9,18 +9,7 @@ import {
import versions from "../versions.json" assert { type: "json" };
import { CheckFile } from "$fresh/src/dev/update_check.ts";
import { WEEK } from "$fresh/src/dev/deps.ts";
function getStdOutput(
out: Deno.CommandOutput,
): { stdout: string; stderr: string } {
const decoder = new TextDecoder();
const stdout = colors.stripColor(decoder.decode(out.stdout));
const decoderErr = new TextDecoder();
const stderr = colors.stripColor(decoderErr.decode(out.stderr));
return { stdout, stderr };
}
import { getStdOutput } from "$fresh/tests/test_utils.ts";
Deno.test({
name: "stores update check file in $HOME/fresh",