1234567891011121314151617181920212223 |
- package goja
- import "testing"
- func TestSetEvilIterator(t *testing.T) {
- const SCRIPT = `
- var o = {};
- o[Symbol.iterator] = function() {
- return {
- next: function() {
- if (!this.flag) {
- this.flag = true;
- return {};
- }
- return {done: true};
- }
- }
- }
- new Set(o);
- undefined;
- `
- testScript1(SCRIPT, _undefined, t)
- }
|