summaryrefslogtreecommitdiffstats
path: root/devtools/shared/jsbeautify/tests/unit/test.js
blob: c7bfd5d8b4fc0d5fa2eb3f19be4b2d349bf35f5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

function run_test() {
  var sanityTest = new SanityTest();
  var results = run_beautifier_tests(sanityTest,
                                     Urlencoded,
                                     beautify.js,
                                     beautify.html,
                                     beautify.css);

  for (let [test_name, parameters, expected_value, result] of sanityTest.successes) {
    equal(result, expected_value, "actual result matches expected");
  }

  for (let [test_name, parameters, expected_value, result] of sanityTest.failures) {
    equal(result, expected_value, "actual result matches expected");
  }
}