Projekt

Obecné

Profil

Stáhnout (1.25 KB) Statistiky
| Větev: | Revize:
1
var console = require("../index")
2
var test = require("tape")
3

    
4
if (typeof window !== "undefined" && !window.JSON) {
5
    window.JSON = require("jsonify")
6
}
7

    
8
test("console has expected methods", function (assert) {
9
    assert.ok(console.log)
10
    assert.ok(console.info)
11
    assert.ok(console.warn)
12
    assert.ok(console.dir)
13
    assert.ok(console.time, "time")
14
    assert.ok(console.timeEnd, "timeEnd")
15
    assert.ok(console.trace, "trace")
16
    assert.ok(console.assert)
17

    
18
    assert.end()
19
})
20

    
21
test("invoke console.log", function (assert) {
22
    console.log("test-log")
23

    
24
    assert.end()
25
})
26

    
27
test("invoke console.info", function (assert) {
28
    console.info("test-info")
29

    
30
    assert.end()
31
})
32

    
33
test("invoke console.warn", function (assert) {
34
    console.warn("test-warn")
35
    
36
    assert.end()
37
})
38

    
39
test("invoke console.time", function (assert) {
40
    console.time("label")
41

    
42
    assert.end()
43
})
44

    
45
test("invoke console.trace", function (assert) {
46
    console.trace("test-trace")
47

    
48
    assert.end()
49
})
50

    
51
test("invoke console.assert", function (assert) {
52
    console.assert(true)
53

    
54
    assert.end()
55
})
56

    
57
test("invoke console.dir", function (assert) {
58
    console.dir("test-dir")
59

    
60
    assert.end()
61
})
62

    
63
test("invoke console.timeEnd", function (assert) {
64
    console.timeEnd("label")
65

    
66
    assert.end()
67
})
    (1-1/1)