Skip to content

Commit

Permalink
test: exported labels is not supported yet
Browse files Browse the repository at this point in the history
  • Loading branch information
wtlin1228 committed Oct 5, 2024
1 parent 8c8c46f commit 2e52f8e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crates/dt_i18n/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ mod tests {
assert!(collect_translation(&module).unwrap().len() == 0);
}

#[test]
fn unsupported_exported_labels() {
let module = parse_module(
r#"
export const LABELS = translate({
bird: "i18n.bird",
cat: "i18n.cat",
dog: "i18n.dog",
})
const Foo = () => <div>{LABELS.bird}</div>
"#,
)
.unwrap();
assert!(collect_translation(&module).unwrap().len() == 0);
}

#[test]
fn unsupported_direct_usage() {
let module = parse_module(
Expand Down

0 comments on commit 2e52f8e

Please sign in to comment.