diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-05-18 11:42:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-18 11:42:03 -0400 |
commit | a2dbcf9e0aa1f70056ccc6ecdd4c813d30af768c (patch) | |
tree | ae0c11a160b1203209b5a54d5dbb693d7dbc5135 /tests/integration/inspector_tests.rs | |
parent | fcb6a18b2b9fe23f3c19f6039d8f270a3a1999d6 (diff) |
perf: analyze cjs exports and emit typescript in parallel (#23856)
Diffstat (limited to 'tests/integration/inspector_tests.rs')
-rw-r--r-- | tests/integration/inspector_tests.rs | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/tests/integration/inspector_tests.rs b/tests/integration/inspector_tests.rs index 6a0f9111e..6f70d36ed 100644 --- a/tests/integration/inspector_tests.rs +++ b/tests/integration/inspector_tests.rs @@ -929,19 +929,32 @@ async fn inspector_with_ts_files() { .await; // receive messages with sources from this test - let script1 = tester.recv().await; - assert_contains!(script1, "testdata/inspector/test.ts"); + let mut scripts = vec![ + tester.recv().await, + tester.recv().await, + tester.recv().await, + ]; + let script1 = scripts.remove( + scripts + .iter() + .position(|s| s.contains("testdata/inspector/test.ts")) + .unwrap(), + ); let script1_id = { let v: serde_json::Value = serde_json::from_str(&script1).unwrap(); v["params"]["scriptId"].as_str().unwrap().to_string() }; - let script2 = tester.recv().await; - assert_contains!(script2, "testdata/inspector/foo.ts"); + let script2 = scripts.remove( + scripts + .iter() + .position(|s| s.contains("testdata/inspector/foo.ts")) + .unwrap(), + ); let script2_id = { let v: serde_json::Value = serde_json::from_str(&script2).unwrap(); v["params"]["scriptId"].as_str().unwrap().to_string() }; - let script3 = tester.recv().await; + let script3 = scripts.remove(0); assert_contains!(script3, "testdata/inspector/bar.js"); let script3_id = { let v: serde_json::Value = serde_json::from_str(&script3).unwrap(); |