mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-02 10:21:07 +00:00
* Adding ignoreBOM and fatal to TextDecoder * Minor tweak to expose_text_processor * Adding in unit tests for BOM * Adding in comment for expose_text_decoder * Attempting to fix build failure * Temporarily disabling unit tests
18 lines
456 B
Rust
18 lines
456 B
Rust
use wasm_bindgen::prelude::*;
|
|
use wasm_bindgen_test::*;
|
|
|
|
#[wasm_bindgen(module = "/tests/headless/strings.js")]
|
|
extern "C" {
|
|
fn test_string_roundtrip(c: &Closure<dyn Fn(String) -> String>);
|
|
|
|
fn identity(s: &str) -> String;
|
|
}
|
|
|
|
#[wasm_bindgen_test]
|
|
fn string_roundtrip() {
|
|
test_string_roundtrip(&Closure::wrap(Box::new(|s| s)));
|
|
|
|
// TODO re-enable this when Firefox 70 is released
|
|
//assert_eq!("\u{feff}bar", &identity("\u{feff}bar"));
|
|
}
|