We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 048df51 commit b6136ccCopy full SHA for b6136cc
test/relative-time.js
@@ -434,6 +434,18 @@ suite('relative-time', function () {
434
})
435
}
436
437
+ test('renders correctly when given an invalid lang', async () => {
438
+ const now = new Date().toISOString()
439
+
440
+ const element = document.createElement('relative-time')
441
+ element.setAttribute('datetime', now)
442
+ element.setAttribute('lang', 'does-not-exist')
443
+ assert.doesNotThrow(() => element.attributeChangedCallback('lang', null, null))
444
445
+ await Promise.resolve()
446
+ assert.equal(element.shadowRoot.textContent, 'now')
447
+ })
448
449
suite('[tense=past]', function () {
450
test('always uses relative dates', async () => {
451
freezeTime(new Date(2033, 1, 1))
0 commit comments