From d5a09f40e4546f7ccd05ebee3b01d7958e6531aa Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Thu, 21 Nov 2024 17:11:46 -0700 Subject: [PATCH] add test that concat does not pass arg through when called with 1 arg --- test/built-ins/Iterator/concat/result-is-iterator.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/built-ins/Iterator/concat/result-is-iterator.js b/test/built-ins/Iterator/concat/result-is-iterator.js index 3a845ff681..7c803ec3b9 100644 --- a/test/built-ins/Iterator/concat/result-is-iterator.js +++ b/test/built-ins/Iterator/concat/result-is-iterator.js @@ -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. /*--- @@ -11,3 +11,7 @@ features: [iterator-sequencing] var iter = Iterator.concat(); 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");