diff options
author | Matthew Olsson <matthewcolsson@gmail.com> | 2020-07-11 10:27:00 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-11 23:13:29 +0200 |
commit | 43d955014d3f0f4f3931e28c6007ad2c3a7dd98f (patch) | |
tree | 1fd19b1a29be50a9667d4ac28fe52266ea6aa4a0 /Libraries/LibJS/Tests/iterators | |
parent | 5ecd504f4e158b1c95b10c88b019b5a2ad232c10 (diff) | |
download | serenity-43d955014d3f0f4f3931e28c6007ad2c3a7dd98f.zip |
LibJS: Implement Symbol.toStringTag
Diffstat (limited to 'Libraries/LibJS/Tests/iterators')
-rw-r--r-- | Libraries/LibJS/Tests/iterators/array-iterator.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Libraries/LibJS/Tests/iterators/array-iterator.js b/Libraries/LibJS/Tests/iterators/array-iterator.js index 117030ebdf..8f02845ebe 100644 --- a/Libraries/LibJS/Tests/iterators/array-iterator.js +++ b/Libraries/LibJS/Tests/iterators/array-iterator.js @@ -2,6 +2,11 @@ test("length", () => { expect(Array.prototype[Symbol.iterator].length).toBe(0); }); +test("@@toStringTag", () => { + expect([].values()[Symbol.toStringTag]).toBe("Array Iterator"); + expect([].values().toString()).toBe("[object Array Iterator]"); +}); + test("same function as Array.prototype.values", () => { expect(Array.prototype[Symbol.iterator]).toBe(Array.prototype.values); }); |