diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/add/argument-string.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/add/argument-string.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/add/argument-string.js b/js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/add/argument-string.js new file mode 100644 index 0000000000..4155fc39a4 --- /dev/null +++ b/js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/add/argument-string.js @@ -0,0 +1,16 @@ +// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally +// Copyright (C) 2020 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindate.prototype.add +description: A string is parsed into the correct object when passed as the argument +includes: [temporalHelpers.js] +features: [Temporal] +---*/ + +const instance = Temporal.PlainDate.from({ year: 2000, month: 5, day: 2 }); +const result = instance.add("P3D"); +TemporalHelpers.assertPlainDate(result, 2000, 5, "M05", 5); + +reportCompare(0, 0); |