From fa50107a042ed8f93a08d716480e156fe3216ca9 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Fri, 25 Oct 2024 20:24:29 +0200 Subject: [PATCH] add overall test --- .gitignore | 3 +-- src/lib.rs | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 68bfbc3..2a0038a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ /target -.idea -pkg \ No newline at end of file +.idea \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 0c0ba6d..9591c45 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,4 +11,14 @@ mod utils; #[wasm_bindgen] pub fn convert_to_hiragana(text: &str) -> String { romanize(text).iter().map(|r| to_hiragana(r)).collect() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_convert_to_hiragana() { + assert_eq!(convert_to_hiragana("assolutamente"), "あっそるためんて"); + } } \ No newline at end of file