test_multiple_tasks.js (479B)
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 = 0; 7 8 add_task(async function test_first() { 9 Assert.equal(someVar, 1, "I should run as the first test task."); 10 someVar++; 11 }); 12 13 add_setup(function setup() { 14 Assert.equal(someVar, 0, "Should run setup first."); 15 someVar++; 16 }); 17 18 add_task(async function test_second() { 19 Assert.equal(someVar, 2, "I should run as the second test task."); 20 });