|
|
@ -41,7 +41,7 @@ describe("hitPointsWithoutConfidenceToString", () => { |
|
|
|
[{currentHealth: -25, maxHealth: 0, maxConfidence: -200}, "{Health: -25/0, Confidence: -/-/-200}"], |
|
|
|
[{currentHealth: -25, maxHealth: 0, maxConfidence: -200}, "{Health: -25/0, Confidence: -/-/-200}"], |
|
|
|
] |
|
|
|
] |
|
|
|
pairs.forEach(([hp, expected]) => { |
|
|
|
pairs.forEach(([hp, expected]) => { |
|
|
|
test(`for ${hp} = "${expected}"`, () => { |
|
|
|
test(`for ${JSON.stringify(hp)} = "${expected}"`, () => { |
|
|
|
expect(hitPointsWithoutConfidenceToString(hp)).toStrictEqual(expected) |
|
|
|
expect(hitPointsWithoutConfidenceToString(hp)).toStrictEqual(expected) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
@ -53,7 +53,7 @@ describe("hitPointsToString", () => { |
|
|
|
[{currentHealth: -25, maxHealth: 0, maxConfidence: -200, currentConfidence: -15}, "{Health: -25/0, Confidence: -15/<err>/-200}"], |
|
|
|
[{currentHealth: -25, maxHealth: 0, maxConfidence: -200, currentConfidence: -15}, "{Health: -25/0, Confidence: -15/<err>/-200}"], |
|
|
|
] |
|
|
|
] |
|
|
|
pairs.forEach(([hp, expected]) => { |
|
|
|
pairs.forEach(([hp, expected]) => { |
|
|
|
test(`for ${hp} = "${expected}"`, () => { |
|
|
|
test(`for ${JSON.stringify(hp)} = "${expected}"`, () => { |
|
|
|
expect(hitPointsToString(hp)).toStrictEqual(expected) |
|
|
|
expect(hitPointsToString(hp)).toStrictEqual(expected) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|