@jeetiss/callbag-marble-tester
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -0,1 +1,5 @@ | ||
var toMarble = function toMarble(values) { | ||
return values.join('-'); | ||
}; | ||
var isDefined = function isDefined(value) { | ||
@@ -104,2 +108,6 @@ return value != null; | ||
var message = function message(expected, received) { | ||
return "\nexpected: " + toMarble(expected) + "\nreceived: " + toMarble(received) + "\n\n"; | ||
}; | ||
var willBe = function willBe(marble, values) { | ||
@@ -120,22 +128,11 @@ if (values === void 0) { | ||
talkback(1); | ||
return; | ||
} | ||
if (t === 1) { | ||
received.push(d); | ||
var test = compare(expected, received); | ||
if (test === compare.EQUAL || test === compare.DIFFERENT) talkback(2); | ||
if (test === compare.EQUAL) resolve(); | ||
if (test === compare.DIFFERENT) reject(); | ||
talkback(1); | ||
} | ||
if (t === 2) { | ||
received.push('|'); | ||
var _test = compare(expected, received, true); | ||
if (_test === compare.EQUAL || _test === compare.DIFFERENT) talkback(2); | ||
if (_test === compare.EQUAL) resolve(); | ||
if (_test === compare.DIFFERENT) reject(); | ||
} | ||
received.push(t === 1 ? d : '|'); | ||
var test = compare(expected, received, t === 2); | ||
if (test === compare.EQUAL || test === compare.DIFFERENT) talkback(2); | ||
if (test === compare.EQUAL) resolve(); | ||
if (test === compare.DIFFERENT) reject(message(expected, received)); | ||
if (t === 1) talkback(1); | ||
}); | ||
@@ -142,0 +139,0 @@ }); |
@@ -5,2 +5,6 @@ 'use strict'; | ||
var toMarble = function toMarble(values) { | ||
return values.join('-'); | ||
}; | ||
var isDefined = function isDefined(value) { | ||
@@ -109,2 +113,6 @@ return value != null; | ||
var message = function message(expected, received) { | ||
return "\nexpected: " + toMarble(expected) + "\nreceived: " + toMarble(received) + "\n\n"; | ||
}; | ||
var willBe = function willBe(marble, values) { | ||
@@ -125,22 +133,11 @@ if (values === void 0) { | ||
talkback(1); | ||
return; | ||
} | ||
if (t === 1) { | ||
received.push(d); | ||
var test = compare(expected, received); | ||
if (test === compare.EQUAL || test === compare.DIFFERENT) talkback(2); | ||
if (test === compare.EQUAL) resolve(); | ||
if (test === compare.DIFFERENT) reject(); | ||
talkback(1); | ||
} | ||
if (t === 2) { | ||
received.push('|'); | ||
var _test = compare(expected, received, true); | ||
if (_test === compare.EQUAL || _test === compare.DIFFERENT) talkback(2); | ||
if (_test === compare.EQUAL) resolve(); | ||
if (_test === compare.DIFFERENT) reject(); | ||
} | ||
received.push(t === 1 ? d : '|'); | ||
var test = compare(expected, received, t === 2); | ||
if (test === compare.EQUAL || test === compare.DIFFERENT) talkback(2); | ||
if (test === compare.EQUAL) resolve(); | ||
if (test === compare.DIFFERENT) reject(message(expected, received)); | ||
if (t === 1) talkback(1); | ||
}); | ||
@@ -147,0 +144,0 @@ }); |
{ | ||
"name": "@jeetiss/callbag-marble-tester", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "👜 Callbag operators for the best tests.", | ||
@@ -5,0 +5,0 @@ "main": "dist/callbag-marble-tester.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8628
242