summaryrefslogtreecommitdiff
path: root/cli/tests/integration/lsp_tests.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-05-11 15:44:15 -0400
committerGitHub <noreply@github.com>2022-05-11 15:44:15 -0400
commite6d8775611c950d42f87339dea36f6b241707050 (patch)
treeaab95058a53bb8cc5cc07fecd647e580dba2eab3 /cli/tests/integration/lsp_tests.rs
parent2da868bb4cde384f82473c146372b8feac4db5d2 (diff)
chore: fix flaky lsp_testing_api test (#14569)
Diffstat (limited to 'cli/tests/integration/lsp_tests.rs')
-rw-r--r--cli/tests/integration/lsp_tests.rs19
1 files changed, 18 insertions, 1 deletions
diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs
index 6e50e2f68..08554bac8 100644
--- a/cli/tests/integration/lsp_tests.rs
+++ b/cli/tests/integration/lsp_tests.rs
@@ -5470,13 +5470,30 @@ Deno.test({
assert!(res.is_ok());
let (method, notification) = res.unwrap();
assert_eq!(method, "deno/testRunProgress");
+ let notification_value = notification
+ .as_ref()
+ .unwrap()
+ .as_object()
+ .unwrap()
+ .get("message")
+ .unwrap()
+ .as_object()
+ .unwrap()
+ .get("value")
+ .unwrap()
+ .as_str()
+ .unwrap();
+ // deno test's output capturing flushes with a zero-width space in order to
+ // synchronize the output pipes. Occassionally this zero width space
+ // might end up in the output so strip it from the output comparison here.
+ assert_eq!(notification_value.replace('\u{200B}', ""), "test a\r\n");
assert_eq!(
notification,
Some(json!({
"id": 1,
"message": {
"type": "output",
- "value": "test a\r\n",
+ "value": notification_value,
"test": {
"textDocument": {
"uri": specifier,