tor-browser

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

test_add_setup.js (431B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 let someVar = 1;
      7 
      8 add_task(() => {
      9  Assert.ok(false, "I should not be called!");
     10 });
     11 
     12 /* eslint-disable mozilla/reject-addtask-only */
     13 add_task(() => {
     14  Assert.equal(
     15    someVar,
     16    2,
     17    "Setup should have run, even though this is the only test."
     18  );
     19 }).only();
     20 
     21 add_setup(() => {
     22  someVar = 2;
     23 });