[
{"name": "0.1% errors against a 99.9% SLO is a burn rate of exactly 1x", "args": [9990, 1000000, 1000], "expect": 1000},
{"name": "1.44% errors against 99.9% is the workbook's 14.4x fast-burn page threshold", "args": [9990, 10000, 144], "expect": 14400},
{"name": "0.6% errors against 99.9% is the workbook's 6x page threshold", "args": [9990, 1000, 6], "expect": 6000},
{"name": "an empty window burns nothing", "args": [9990, 0, 0], "expect": 0},
{"name": "no errors burns nothing", "args": [9990, 50000, 0], "expect": 0},
{"name": "every request failing at 99.9% is 1000x", "args": [9990, 50, 50], "expect": 1000000},
{"name": "1.5% errors against a 99% SLO is 1.5x", "args": [9900, 200, 3], "expect": 1500},
{"name": "rounds half up: 2.5 thousandths becomes 3", "args": [9000, 4000, 1], "expect": 3},
{"name": "one error in three requests at 99.9% rounds down: 333.333x", "args": [9990, 3, 1], "expect": 333333},
{"name": "two errors in three requests at 99.9% rounds up: 666.667x", "args": [9990, 3, 2], "expect": 666667},
{"name": "the loosest target, 0.01%: everything failing is barely over 1x", "args": [1, 9999, 9999], "expect": 1000},
{"name": "a trillion requests at 99.99%: products pass 2^53 and stay exact", "args": [9999, 1000000000000, 1234567891], "expect": 12346},
{"name": "a 100% target has no budget to burn and is an error", "args": [10000, 100, 1], "expectError": "targetBasisPoints must be a whole number from 1 to 9999 (10000 leaves no error budget), received 10000"},
{"name": "a 0% target is an error", "args": [0, 100, 1], "expectError": "targetBasisPoints must be a whole number from 1 to 9999"},
{"name": "negative total is an error", "args": [9990, -5, 0], "expectError": "totalEvents must be a whole number of at least 0, received -5"},
{"name": "more bad events than events is an error", "args": [9990, 4, 5], "expectError": "badEvents must not exceed totalEvents: 5 > 4"},
{"name": "a fractional count is an error", "args": [9990, 10, 1.5], "expectError": "badEvents must be a whole number of at least 0, received 1.5"}
]