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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
exports.taps = [
'Tests for the foo module',
{
ok: true,
file: 'foo.js',
line: 8,
name: 'fooish test',
stack: new Error('fooish').stack
},
{
ok: false,
name: 'a test that the bar is barish',
file: 'bar.js',
line: 25,
expected: 'bar\nbar\nbaz',
actual: 'rab\nrib\nzib',
hash: {
more: '\nstuff\nhere\n',
regexp: /asdf/
}
},
'Quux module tests',
'This is a longer comment',
{
ok: true,
name: 'an easy one.'
},
{
ok: false,
name: 'bloooooo',
expected: 'blerggeyyy',
actual: 'blorggeyy'
},
{
ok: false,
name: 'array test',
expected: [
{
ok: true
},
{
ok: true
},
{
stack: new Error().stack
}
],
actual: [
1234567890,
123456789,
{
error: new Error('yikes')
}
]
},
{
ok: true,
name: 'nulltest',
expected: undefined,
actual: null
},
{
ok: true,
name: 'weird key test',
expected: 'weird key',
actual: 'weird key',
'this object': {
'has a ': 'weird key',
'and a looooooooonnnnnnnnnggg': 'jacket'
}
},
{
ok: true,
name: 'regexp test',
regexp: /asdf/,
function: function (a, b) { return a + b }
}
]
if (require.main === module) {
console.log('1..1')
console.log('ok 1 - just setup, nothing relevant')
}
|