Fix error in test for Temporal.now.plainDateTime

This commit is contained in:
Mike Pennisi 2021-08-25 23:28:54 -04:00 committed by Rick Waldron
parent 9cb0746f52
commit 0ecc26b987
1 changed files with 14 additions and 2 deletions

View File

@ -9,7 +9,12 @@ features: [Proxy, Temporal]
---*/
const actual = [];
const expected = [
const expectedWithout = [
'has calendar.calendar',
'get calendar.calendar',
'has nestedCalendar.calendar'
];
const expectedWith = [
'has calendar.calendar',
'get calendar.calendar',
'has nestedCalendar.calendar',
@ -58,4 +63,11 @@ Object.defineProperty(Temporal.Calendar, 'from', {
Temporal.Now.plainDateTime(calendar);
assert.compareArray(actual, expected, 'The value of actual is expected to equal the value of expected');
assert.compareArray(actual, expectedWithout, 'Observable interactions without `calendar` property');
actual.length = 0;
nestedCalendar.calendar = null;
Temporal.Now.plainDateTime(calendar);
assert.compareArray(actual, expectedWith, 'Observable interactions with `calendar` property');