Skip to content

Commit 2e52f8e

Browse files
committed
test: exported labels is not supported yet
1 parent 8c8c46f commit 2e52f8e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

crates/dt_i18n/src/core.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,22 @@ mod tests {
8383
assert!(collect_translation(&module).unwrap().len() == 0);
8484
}
8585

86+
#[test]
87+
fn unsupported_exported_labels() {
88+
let module = parse_module(
89+
r#"
90+
export const LABELS = translate({
91+
bird: "i18n.bird",
92+
cat: "i18n.cat",
93+
dog: "i18n.dog",
94+
})
95+
const Foo = () => <div>{LABELS.bird}</div>
96+
"#,
97+
)
98+
.unwrap();
99+
assert!(collect_translation(&module).unwrap().len() == 0);
100+
}
101+
86102
#[test]
87103
fn unsupported_direct_usage() {
88104
let module = parse_module(

0 commit comments

Comments
 (0)