Pauan fb0bbc00cb Adding ignoreBOM and fatal to TextDecoder (#1730)
* 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
2019-08-22 20:00:49 -07:00

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"));
}