blob: 4fb47ea1e186fb086315850f77ebeb8fc2fcfe5d [file] [log] [blame]
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.instant.prototype.equals
description: Time separator in string argument can vary
features: [Temporal]
---*/
const tests = [
["1970-01-01T00:00Z", "uppercase T"],
["1970-01-01t00:00Z", "lowercase T"],
["1970-01-01 00:00Z", "space between date and time"],
];
const instance = new Temporal.Instant(0n);
tests.forEach(([arg, description]) => {
const result = instance.equals(arg);
assert.sameValue(
result,
true,
`variant time separators (${description})`
);
});