add overall test
This commit is contained in:
parent
3fd7978b63
commit
fa50107a04
2 changed files with 11 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,2 @@
|
|||
/target
|
||||
.idea
|
||||
pkg
|
||||
.idea
|
10
src/lib.rs
10
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"), "あっそるためんて");
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue