Skip to content

Commit 8faedb7

Browse files
committed
Fix
1 parent 7149884 commit 8faedb7

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,11 @@ class AppUpdateHandler
124124

125125
UpdateSourceFile(sourcePath, source.Replace("Console.WriteLine(\".\");", "Console.WriteLine(\"Updated\");"));
126126

127-
await App.AssertOutputLineStartsWith("dotnet watch ⚠ [WatchHotReloadApp (net9.0)] Expected to find a static method 'ClearCache' or 'UpdateApplication' on type 'AppUpdateHandler, WatchHotReloadApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' but neither exists.");
128-
129127
await App.AssertOutputLineStartsWith("Updated");
128+
129+
Assert.Contains(
130+
"dotnet watch ⚠ [WatchHotReloadApp (net9.0)] Expected to find a static method 'ClearCache' or 'UpdateApplication' on type 'AppUpdateHandler, WatchHotReloadApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' but neither exists.",
131+
App.Process.Output);
130132
}
131133

132134
[Theory]
@@ -163,22 +165,21 @@ class AppUpdateHandler
163165

164166
UpdateSourceFile(sourcePath, source.Replace("Console.WriteLine(\".\");", "Console.WriteLine(\"Updated\");"));
165167

168+
await App.AssertOutputLineStartsWith("Updated");
166169

167-
await App.AssertOutputLineStartsWith("dotnet watch ⚠ [WatchHotReloadApp (net9.0)] Exception from 'System.Action`1[System.Type[]]': System.InvalidOperationException: Bug!");
170+
Assert.Contains(
171+
"dotnet watch ⚠ [WatchHotReloadApp (net9.0)] Exception from 'System.Action`1[System.Type[]]': System.InvalidOperationException: Bug!",
172+
App.Process.Output);
168173

169174
if (verbose)
170175
{
171-
await App.AssertOutputLineStartsWith("dotnet watch 🕵️ [WatchHotReloadApp (net9.0)] Deltas applied.");
176+
Assert.Contains("dotnet watch 🕵️ [WatchHotReloadApp (net9.0)] Deltas applied.", App.Process.Output);
172177
}
173178
else
174179
{
175180
// shouldn't see any agent messages:
176-
await App.AssertOutputLineStartsWith(MessageDescriptor.HotReloadSucceeded, failure: line => line.Contains("🕵️"));
181+
Assert.DoesNotContain("🕵️", App.Process.Output);
177182
}
178-
179-
await App.AssertOutputLineStartsWith(" at AppUpdateHandler.ClearCache(Type[] types)");
180-
181-
await App.AssertOutputLineStartsWith("Updated");
182183
}
183184

184185
[Fact]

0 commit comments

Comments
 (0)