tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

string-builtins.tentative.any.js (593B)


      1 // META: global=window,dedicatedworker,jsshell,shadowrealm
      2 
      3 promise_test(async () => {
      4  const wasmModule = await import("./resources/js-string-builtins.wasm");
      5 
      6  assert_equals(wasmModule.getLength("hello"), 5);
      7  assert_equals(wasmModule.concatStrings("hello", " world"), "hello world");
      8  assert_equals(wasmModule.compareStrings("test", "test"), 1);
      9  assert_equals(wasmModule.compareStrings("test", "different"), 0);
     10  assert_equals(wasmModule.testString("hello"), 1);
     11  assert_equals(wasmModule.testString(42), 0);
     12 }, "String builtins should be supported in imports in ESM integration");