From 6540f4410c94b17fd0181e1a41c6968c3238dcd5 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Wed, 14 May 2025 04:49:56 +0000 Subject: [PATCH] test(transformer/jsx): fix tests for JSX pragma parsing (#11000) Remove duplicated logic in tests. I forgot to remove this block when I added the prefix/postfix testing. It's pointless as the block above covers all these cases already. --- crates/oxc_transformer/src/jsx/comments.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/crates/oxc_transformer/src/jsx/comments.rs b/crates/oxc_transformer/src/jsx/comments.rs index 92469790e8edf..8cc62e2864d5f 100644 --- a/crates/oxc_transformer/src/jsx/comments.rs +++ b/crates/oxc_transformer/src/jsx/comments.rs @@ -248,14 +248,6 @@ mod tests { assert_eq!(&pragmas, expected); } } - - let mut comment_str = *comment_str; - let mut pragmas = vec![]; - while let Some((pragma_type, value, remaining)) = find_jsx_pragma(comment_str) { - pragmas.push((pragma_type, value)); - comment_str = remaining; - } - assert_eq!(&pragmas, expected); } } }