diff --git a/tests/pure/web.dom-collections.iterator.js b/tests/pure/web.dom-collections.iterator.js index 31ae88486273..641cc5053b27 100644 --- a/tests/pure/web.dom-collections.iterator.js +++ b/tests/pure/web.dom-collections.iterator.js @@ -42,9 +42,11 @@ QUnit.test('Iterable DOM collections', assert => { for (const name of collections) { const Collection = GLOBAL[name]; if (Collection) { - assert.same(Collection.prototype[Symbol.toStringTag], name, `${ name }::@@toStringTag is '${ name }'`); - assert.isFunction(getIteratorMethod(Collection.prototype), `${ name }::@@iterator is function`); absent = false; + assert.same(Collection.prototype[Symbol.toStringTag], name, `${ name }::@@toStringTag is '${ name }'`); + if (Object.prototype.toString.call(Collection.prototype).slice(8, -1) === name) { + assert.isFunction(getIteratorMethod(Collection.prototype), `${ name }::@@iterator is function`); + } } }