Skip to content
Source
Sign inSign up
pingdotgg/t3code

test(server): use the live clock for theme watch notifications #39598

MergedStiensWout(GitHub profile, opens in a new tab)merged 9 commits intomain fromrefs/pull/39598/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 161 additions and 5 deletions (loading 3).

x
0 of 5 viewed, 5 left
134 additions and 3 deletionsapps/server/src/environmentTheme.test.tsModified
View file
@@ -5,7 +5,8 @@
THEME_CSS_MAX_LENGTH,
} from "@t3tools/contracts";
import * as NodeServices from "@effect/platform-node/NodeServices";
-import { assert, it } from "@effect/vitest";
+import * as HostProcess from "@t3tools/shared/HostProcess";
+import { assert, describe, it } from "@effect/vitest";
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
import * as Layer from "effect/Layer";
@@ -97,14 +98,14 @@
),
),
- });
+ }).pipe(Effect.provide(NodeServices.layer));
​
const currentThemes = Effect.gen(function* () {
const environmentTheme = yield* EnvironmentTheme.EnvironmentThemeService;
return yield* environmentTheme.current;
});
​
-it.layer(NodeServices.layer)("environment theme", (it) => {
+describe("environment theme", () => {
it.effect("follows the directory rather than the set read at start", () =>
withEnvironmentThemes(
{ "nightfall.json": encodeThemeFile(NIGHTFALL_THEME) },
@@ -159,6 +160,136 @@