Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
fix test name generation
Browse files Browse the repository at this point in the history
  • Loading branch information
xunilrj committed Aug 5, 2022
1 parent 05135bf commit a20d3e4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/tests_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ fn transform_file_name(input: &str) -> String {
| "typeof"
);

let is_number = result.as_str().parse::<u32>().is_ok();
let is_number = result
.chars()
.next()
.unwrap()
.to_string()
.parse::<u32>()
.is_ok();

if is_keyword {
result.push('_');
Expand Down

0 comments on commit a20d3e4

Please sign in to comment.