OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 /** | |
6 * @fileoverview JSCompiler externs for QUnit. | |
7 * @externs | |
8 */ | |
9 | |
10 /** | |
11 * namespace | |
12 * @const | |
13 */ | |
14 var QUnit = {}; | |
15 | |
16 | |
17 /** | |
18 */ | |
19 QUnit.start = function() {}; | |
20 | |
21 | |
22 /** | |
23 */ | |
24 QUnit.stop = function() {}; | |
25 | |
26 | |
27 /** | |
28 * @param {string} name | |
29 * @param {function(!QUnit.Assert)} testFunction | |
30 */ | |
31 QUnit.test = function(name, testFunction) {}; | |
32 | |
33 | |
34 | |
35 /** | |
36 * @constructor | |
37 */ | |
38 QUnit.Assert = function() {}; | |
39 | |
40 | |
41 /** | |
42 * @param {number} assertionCount | |
43 */ | |
44 QUnit.Assert.prototype.expect = function(assertionCount) {}; | |
45 | |
46 | |
47 /** @constructor */ | |
48 QUnit.Clock = function() {}; | |
49 | |
50 | |
51 /** @param {number} ticks */ | |
52 QUnit.Clock.prototype.tick = function(ticks) {}; | |
53 | |
54 | |
55 /** | |
56 * @param {*} a | |
57 * @param {*} b | |
58 * @param {string=} opt_desc | |
59 */ | |
60 QUnit.Assert.prototype.notEqual = function(a, b, opt_desc) {}; | |
61 | |
62 | |
63 /** | |
64 * @param {*} a | |
65 * @param {*} b | |
66 * @param {string=} opt_message | |
67 */ | |
68 QUnit.Assert.prototype.strictEqual = function(a, b, opt_message) {}; | |
69 | |
70 | |
71 /** | |
72 * @param {boolean} condition | |
73 * @param {string=} opt_message | |
74 */ | |
75 QUnit.Assert.prototype.ok = function(condition, opt_message) {}; | |
76 | |
77 | |
78 /** | |
79 * @return {function():void} | |
80 */ | |
81 QUnit.Assert.prototype.async = function() {}; | |
82 | |
83 | |
84 /** | |
85 * @param {*} a | |
86 * @param {*} b | |
87 * @param {string=} opt_message | |
88 */ | |
89 QUnit.Assert.prototype.deepEqual = function(a, b, opt_message) {}; | |
90 | |
91 | |
92 /** | |
93 * @param {function()} a | |
94 * @param {*=} opt_b | |
95 * @param {string=} opt_message | |
96 */ | |
97 QUnit.Assert.prototype.throws = function(a, opt_b, opt_message) {}; | |
98 | |
99 | |
100 /** | |
101 * @param {*} a | |
102 * @param {*} b | |
103 * @param {string=} opt_message | |
104 */ | |
105 QUnit.Assert.prototype.equal = function(a, b, opt_message) {}; | |
106 | |
107 | |
108 /** @param {Function} f */ | |
109 QUnit.testStart = function(f) {}; | |
110 | |
111 | |
112 /** @param {Function} f */ | |
113 QUnit.testDone = function(f) {}; | |
114 | |
115 | |
116 /** | |
117 * @typedef {{ | |
118 * beforeEach: (function(!QUnit.Assert) | undefined), | |
119 * afterEach: (function(!QUnit.Assert) | undefined) | |
120 * }} | |
121 */ | |
122 QUnit.ModuleArgs; | |
123 | |
124 | |
125 /** | |
126 * @param {string} desc | |
127 * @param {QUnit.ModuleArgs=} opt_args= | |
128 */ | |
129 QUnit.module = function(desc, opt_args) {}; | |
OLD | NEW |