add test that concat does not pass arg through when called with 1 arg

This commit is contained in:
Michael Ficarra 2024-11-21 17:11:46 -07:00 committed by Philip Chimento
parent a12abf58af
commit d5a09f40e4
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
// Copyright (C) 2024 André Bargull. All rights reserved. // Copyright (C) 2024 André Bargull and Michael Ficarra. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
@ -11,3 +11,7 @@ features: [iterator-sequencing]
var iter = Iterator.concat(); var iter = Iterator.concat();
assert(iter instanceof Iterator, "Iterator.concat() must return an Iterator"); assert(iter instanceof Iterator, "Iterator.concat() must return an Iterator");
var customIter = { next() { return { done: true, value: undefined }; } };
iter = Iterator.concat({ [Symbol.iterator]() { return customIter; } });
assert(iter instanceof Iterator, "Iterator.concat(...) must return an Iterator");