From 425716345f2caa1c7751cb1c079d8cc209d2738e Mon Sep 17 00:00:00 2001 From: Justin Grant Date: Fri, 21 Jul 2023 00:55:39 -0700 Subject: [PATCH] Test Temporal.Instant w/ trailing zeroes in offset I noticed a small test hole in codecov: we weren't testing Temporal.Instant parsing with trailing zeroes in the offset. I also didn't see fractional offset testing, so added that too. --- .../Temporal/Instant/from/argument-string.js | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/test/built-ins/Temporal/Instant/from/argument-string.js b/test/built-ins/Temporal/Instant/from/argument-string.js index bfea63e3aa..923158e21c 100644 --- a/test/built-ins/Temporal/Instant/from/argument-string.js +++ b/test/built-ins/Temporal/Instant/from/argument-string.js @@ -35,6 +35,33 @@ const tests = [ ['+0019761118T152330.1+00:00', 217178610100000000n], ['+0019761118T152330.1+0000', 217178610100000000n], ['1976-11-18T15:23:30+00', 217178610000000000n], + ['1976-11-18T15:23:30.123456789-00:00:00', 217178610123456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.0', 217178610123456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.00', 217178610123456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.000', 217178610123456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.0000', 217178610123456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.00000', 217178610123456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.000000', 217178610123456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.0000000', 217178610123456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.00000000', 217178610123456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.000000000', 217178610123456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.1', 217178610223456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.01', 217178610133456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.001', 217178610124456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.0001', 217178610123556789n], + ['1976-11-18T15:23:30.123456789-00:00:00.00001', 217178610123466789n], + ['1976-11-18T15:23:30.123456789-00:00:00.000001', 217178610123457789n], + ['1976-11-18T15:23:30.123456789-00:00:00.0000001', 217178610123456889n], + ['1976-11-18T15:23:30.123456789-00:00:00.00000001', 217178610123456799n], + ['1976-11-18T15:23:30.123456789-00:00:00.000000001', 217178610123456790n], + ['1976-11-18T15:23:30.123456789-00:00:00.100000000', 217178610223456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.010000000', 217178610133456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.001000000', 217178610124456789n], + ['1976-11-18T15:23:30.123456789-00:00:00.000100000', 217178610123556789n], + ['1976-11-18T15:23:30.123456789-00:00:00.000010000', 217178610123466789n], + ['1976-11-18T15:23:30.123456789-00:00:00.000001000', 217178610123457789n], + ['1976-11-18T15:23:30.123456789-00:00:00.000000100', 217178610123456889n], + ['1976-11-18T15:23:30.123456789-00:00:00.000000010', 217178610123456799n], ['1976-11-18T15Z', 217177200000000000n], ['1976-11-18T15:23:30.123456789Z[u-ca=discord]', 217178610123456789n], ['1976-11-18T15:23:30.123456789Z[+00]', 217178610123456789n],