MCPcopy
hub / github.com/farzher/fuzzysort / assert

Function assert

test/test.js:367–376  ·  view source on GitHub ↗
(b, ...m)

Source from the content-addressed store, hash-verified

365
366// helper function nonsense
367function assert(b, ...m) {
368 if(!b) {
369 console.error(/* assert.count, */'ASSERTION FAILED!', ...m)
370 assert.failed = true
371 } else {
372 // console.log(assert.count, 'test passed')
373 }
374
375 assert.count += 1
376}
377assert.count = 0
378
379function testSorting(search, ...targets) {

Callers 9

testsFunction · 0.85
testSortingFunction · 0.85
testSorting1Function · 0.85
testFunction · 0.85
testStrictFunction · 0.85
testSimpleFunction · 0.85
testSubstrFunction · 0.85
testNomatchFunction · 0.85
assertResultIntegrityFunction · 0.85

Calls

no outgoing calls

Tested by 1

testFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…