forked from dequelabs/axe-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.js
More file actions
26 lines (22 loc) · 611 Bytes
/
log.js
File metadata and controls
26 lines (22 loc) · 611 Bytes
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
describe('axe.log', function () {
'use strict';
it('should be a function', function () {
assert.isFunction(axe.log);
});
it('should invoke console.log', function () {
if (!window.console || window.console.log) {
window.console = { log: function () {} };
}
var orig = window.console.log;
var expected = ['hi', 'hello'];
var success = false;
window.console.log = function () {
success = true;
assert.equal(arguments[0], expected[0]);
assert.equal(arguments[1], expected[1]);
};
axe.log.apply(axe.log, expected);
assert.isTrue(success);
window.console.log = orig;
});
});