index.js
1.25 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
var console = require("../index")
var test = require("tape")
if (typeof window !== "undefined" && !window.JSON) {
window.JSON = require("jsonify")
}
test("console has expected methods", function (assert) {
assert.ok(console.log)
assert.ok(console.info)
assert.ok(console.warn)
assert.ok(console.dir)
assert.ok(console.time, "time")
assert.ok(console.timeEnd, "timeEnd")
assert.ok(console.trace, "trace")
assert.ok(console.assert)
assert.end()
})
test("invoke console.log", function (assert) {
console.log("test-log")
assert.end()
})
test("invoke console.info", function (assert) {
console.info("test-info")
assert.end()
})
test("invoke console.warn", function (assert) {
console.warn("test-warn")
assert.end()
})
test("invoke console.time", function (assert) {
console.time("label")
assert.end()
})
test("invoke console.trace", function (assert) {
console.trace("test-trace")
assert.end()
})
test("invoke console.assert", function (assert) {
console.assert(true)
assert.end()
})
test("invoke console.dir", function (assert) {
console.dir("test-dir")
assert.end()
})
test("invoke console.timeEnd", function (assert) {
console.timeEnd("label")
assert.end()
})