Add Intel copyright header.
[profile/ivi/cowhide.git] / examples / hoofbeats / tests / unit / hoofbeats-phantom.js
1 /*
2  * Copyright (c) 2012, Intel Corporation.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9
10 // Logging setup for phantom integration
11 // adapted from Modernizr
12
13 QUnit.begin = function () {
14   console.log("Starting test suite")
15   console.log("================================================\n")
16 }
17
18 QUnit.moduleDone = function (opts) {
19   if (opts.failed === 0) {
20     console.log("\u2714 All tests passed in '" + opts.name + "' module")
21   } else {
22     console.log("\u2716 " + opts.failed + " tests failed in '" + opts.name + "' module")
23   }
24 }
25
26 QUnit.done = function (opts) {
27   console.log("\n================================================")
28   console.log("Tests completed in " + opts.runtime + " milliseconds")
29   console.log(opts.passed + " tests of " + opts.total + " passed, " + opts.failed + " failed.")
30 }