tor-browser

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

test_census_diff_02.js (465B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 "use strict";
      4 
      5 // Test diffing census reports of breakdown by "count".
      6 
      7 const BREAKDOWN = { by: "count", count: true, bytes: true };
      8 
      9 const REPORT1 = {
     10  count: 10,
     11  bytes: 100,
     12 };
     13 
     14 const REPORT2 = {
     15  count: 11,
     16  bytes: 110,
     17 };
     18 
     19 const EXPECTED = {
     20  count: 1,
     21  bytes: 10,
     22 };
     23 
     24 function run_test() {
     25  assertDiff(BREAKDOWN, REPORT1, REPORT2, EXPECTED);
     26 }