Add some tests

This commit is contained in:
zkldi
2021-12-02 17:37:00 +00:00
parent b2ac75646b
commit 4a118e533b
@@ -18,6 +18,14 @@ t.test("#DeriveLamp", (t) => {
t.equal(DeriveLamp(d(uscScore, { options: { gaugeType: 2 }, gauge: 1 }), logger), "FAILED");
t.equal(DeriveLamp(d(uscScore, { options: { gaugeType: 2 }, gauge: 0 }), logger), "FAILED");
t.equal(
DeriveLamp(d(uscScore, { options: { gaugeType: 2 }, gauge: 1, score: 10_000_000 }), logger),
"PERFECT ULTIMATE CHAIN"
);
t.equal(
DeriveLamp(d(uscScore, { options: { gaugeType: 2 }, gauge: 1, error: 0 }), logger),
"ULTIMATE CHAIN"
);
t.equal(
DeriveLamp(d(uscScore, { options: { gaugeType: 1 }, gauge: 0.1 }), logger),
@@ -61,7 +69,7 @@ t.test("#DeriveLamp", (t) => {
"ULTIMATE CHAIN"
);
t.throws(() => DeriveLamp(d(uscScore, { options: { gaugeType: 2 } }), logger));
t.throws(() => DeriveLamp(d(uscScore, { options: { gaugeType: 3 } }), logger));
t.end();
});