Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions crates/aft/tests/integration/lsp_manager_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,14 @@ fn test_custom_server_env_and_initialization_options_reach_spawned_server() {
fn astro_uses_the_nearest_project_typescript_sdk() {
let temp_dir = tempdir().unwrap();
let root = temp_dir.path().join("workspace");
let member = root.join("apps/site");
let page = member.join("src/page.astro");
let root_tsdk = root.join("node_modules/typescript/lib");
let member_tsdk = member.join("node_modules/typescript/lib");
let member = root.join("apps").join("site");
let page = member.join("src").join("page.astro");
// Build the expected tsdk exactly as find_project_typescript_sdk does
// (component-wise joins). A single join("node_modules/typescript/lib")
// keeps its embedded forward slashes on Windows, so the comparison would
// hold a mixed-separator path the production walk never produces.
let root_tsdk = root.join("node_modules").join("typescript").join("lib");
let member_tsdk = member.join("node_modules").join("typescript").join("lib");
fs::create_dir_all(page.parent().unwrap()).unwrap();
fs::create_dir_all(&root_tsdk).unwrap();
fs::create_dir_all(&member_tsdk).unwrap();
Expand Down
Loading