MCPcopy Create free account
hub / github.com/porsager/postgres / exit

Function exit

tests/test.js:62–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60}
61
62function exit() {
63 let success = true
64 Object.values(tests).every((x) => {
65 if (x.succeeded)
66 return true
67
68 success = false
69 x.cleanup
70 ? console.error('⛔️', x.name + ' at line', x.line, 'cleanup failed', '\n', util.inspect(x.cleanup))
71 : console.error('⛔️', x.name + ' at line', x.line, x.failed
72 ? 'failed'
73 : 'never finished', x.error ? '\n' + util.inspect(x.error) : ''
74 )
75 })
76
77 only
78 ? console.error('⚠️', 'Not all tests were run')
79 : ignored
80 ? console.error('⚠️', ignored, 'ignored test' + (ignored === 1 ? '' : 's', '\n'))
81 : success
82 ? console.log('🎉')
83 : console.error('⚠️', 'Not good')
84
85 !process.exitCode && (!success || only || ignored) && (process.exitCode = 1)
86}
87

Callers 1

testFunction · 0.70

Calls 1

valuesMethod · 0.65

Tested by 1

testFunction · 0.56