typescript: Fix handling of jest/vitest tests with regex characters in name (#35090)
Closes #35065 Release Notes: - JavaScript/TypeScript tasks: Fixed handling of Vitest/Jest tests with regex-specific characters in their name.
This commit is contained in:
parent
631f9a1b31
commit
57b463fd0d
1 changed files with 1 additions and 1 deletions
|
@ -512,7 +512,7 @@ fn eslint_server_binary_arguments(server_path: &Path) -> Vec<OsString> {
|
|||
fn replace_test_name_parameters(test_name: &str) -> String {
|
||||
let pattern = regex::Regex::new(r"(%|\$)[0-9a-zA-Z]+").unwrap();
|
||||
|
||||
pattern.replace_all(test_name, "(.+?)").to_string()
|
||||
regex::escape(&pattern.replace_all(test_name, "(.+?)"))
|
||||
}
|
||||
|
||||
pub struct TypeScriptLspAdapter {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue