summaryrefslogtreecommitdiffstats
path: root/devtools/client/performance/test/unit/test_marker-blueprint.js
blob: b3db47c0f1fc30184db2f9a0cda3e8b74b0e3431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/**
 * Tests if the timeline blueprint has a correct structure.
 */

function run_test() {
  run_next_test();
}

add_task(function () {
  let { TIMELINE_BLUEPRINT } = require("devtools/client/performance/modules/markers");

  ok(TIMELINE_BLUEPRINT,
    "A timeline blueprint should be available.");

  ok(Object.keys(TIMELINE_BLUEPRINT).length,
    "The timeline blueprint has at least one entry.");

  for (let value of Object.values(TIMELINE_BLUEPRINT)) {
    ok("group" in value,
      "Each entry in the timeline blueprint contains a `group` key.");
    ok("colorName" in value,
      "Each entry in the timeline blueprint contains a `colorName` key.");
    ok("label" in value,
      "Each entry in the timeline blueprint contains a `label` key.");
  }
});