#GlobalSetup
The spread operator is significantly slower than using the special constructor when converting data to ObservableCollection (113788) https://github.com/dotnet/runtime/issues/113788
The spread operator is significantly slower than using the special constructor when converting data to ObservableCollection · Issue #113788 · dotnet/runtime
Take this benchmark for example public class ObservableCollectionBenchmark<T> { private List<T> Data; [GlobalSetup] public void Setup() { Data = Enumerable.Range(0, 10000).Select(i => (T)Convert.Ch...
github.com
March 22, 2025 at 1:11 PM
June 5, 2025 at 9:19 AM
The benchmark includes a GlobalSetup method for creating a simple CSV stream, which ensures that only the parsing is measured. Proper cleanup avoids memory leaks as more benchmarks are added. #CleanupBestPractices
January 31, 2025 at 12:46 AM
it was an issue with sourcemaps not being applied to stack traces from globalSetup files
github.com/vitest-dev/v...
fix: process sourcemaps for stack traces from `globalSetup` files by aleclarson · Pull Request #7101 · vitest-dev/vitest
Description When a globalSetup file (or a module imported as a result of a globalSetup file&#39;s execution) has an error at runtime, the sourcemaps were not being used, because globalSetup files a...
github.com
December 18, 2024 at 3:47 PM
They're E2E tests so I'd like to avoid mocking if at all possible.

Don't know why I initially thought avoiding an actual node:http server was the answer, but now I have a globalSetup file starting one in my Vitest suite and it's fast enough 😅

Thanks for chiming in though!
December 12, 2024 at 2:45 PM