Make the App own the Platform

Removes optional platform, which only existed for tests.

There is now a global `@import("testing.zig").test_app` available. This is setup
when the test runner starts, and cleaned up at the end of tests. Individual
tests don't have to worry about creating app, which I assume was the reason I
Platform optional, since that woul dhave been something else that needed to be
setup.
This commit is contained in:
Karl Seguin
2025-08-22 15:48:20 +08:00
parent 67b479b5c8
commit 687f09d952
10 changed files with 63 additions and 74 deletions

View File

@@ -186,10 +186,7 @@ test "telemetry: getOrCreateId" {
}
test "telemetry: sends event to provider" {
var app = testing.createApp(.{});
defer app.deinit();
var telemetry = try TelemetryT(MockProvider).init(app, .serve);
var telemetry = try TelemetryT(MockProvider).init(testing.test_app, .serve);
defer telemetry.deinit();
const mock = &telemetry.provider;