tor-browser

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

browser_test_assert.js (551B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 function test() {
      5  export_assertions();
      6 
      7  ok(true, "pass ok");
      8  is(true, true, "pass is");
      9  isnot(false, true, "pass isnot");
     10  todo(false, "pass todo");
     11  todo_is(false, true, "pass todo_is");
     12  todo_isnot(true, true, "pass todo_isnot");
     13  info("info message");
     14 
     15  var func = is;
     16  func(1, 1, "pass indirect is");
     17 
     18  stringMatches("hello world", /llo\s/);
     19  stringMatches("hello world", "llo\\s");
     20  stringContains("hello world", "llo");
     21 }