From 82d36579b2c8f307386c205b13951bf48bae6c63 Mon Sep 17 00:00:00 2001 From: Kevin Carroll Date: Wed, 10 Dec 2025 09:49:43 -0700 Subject: [PATCH] Description Unit Test Update (#173) * Fixed an issue with the new description unit tests such that line endings was effecting the default value of some query variables resulting in test failures on some environments (i.e. those using CRLF endings). * This commit does not effect production code --- .../Execution/DocumentDescriptionTests.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unit-tests/graphql-aspnet-tests/Execution/DocumentDescriptionTests.cs b/src/unit-tests/graphql-aspnet-tests/Execution/DocumentDescriptionTests.cs index 9f32596c..b02b79ee 100644 --- a/src/unit-tests/graphql-aspnet-tests/Execution/DocumentDescriptionTests.cs +++ b/src/unit-tests/graphql-aspnet-tests/Execution/DocumentDescriptionTests.cs @@ -21,6 +21,10 @@ public class DocumentDescriptionTests { private async Task RenderQuery(string queryText, string variableJsonDoc = null) { + // depending on environment (win vs. nix, CRLF vs LF) the tested query text may end in \r\n or \n + // the output will only be in \n, normalize hte input to ensure tests have a uniform start + // e.g. default values passed for multi-line string variables used in tests can be different based on line endings in the test file. + queryText = queryText.Replace("\r\n", "\n"); var server = new TestServerBuilder() .AddController() .Build();