diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/GeneratorPrototype/next')
3 files changed, 13 insertions, 11 deletions
diff --git a/js/src/tests/test262/built-ins/GeneratorPrototype/next/length.js b/js/src/tests/test262/built-ins/GeneratorPrototype/next/length.js index d4bbe4aaad..630d5cde07 100644 --- a/js/src/tests/test262/built-ins/GeneratorPrototype/next/length.js +++ b/js/src/tests/test262/built-ins/GeneratorPrototype/next/length.js @@ -26,10 +26,11 @@ features: [generators] function* g() {} var GeneratorPrototype = Object.getPrototypeOf(g).prototype; -assert.sameValue(GeneratorPrototype.next.length, 1); - -verifyNotEnumerable(GeneratorPrototype.next, "length"); -verifyNotWritable(GeneratorPrototype.next, "length"); -verifyConfigurable(GeneratorPrototype.next, "length"); +verifyProperty(GeneratorPrototype.next, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/GeneratorPrototype/next/name.js b/js/src/tests/test262/built-ins/GeneratorPrototype/next/name.js index e52239af1a..f29ac96536 100644 --- a/js/src/tests/test262/built-ins/GeneratorPrototype/next/name.js +++ b/js/src/tests/test262/built-ins/GeneratorPrototype/next/name.js @@ -23,10 +23,11 @@ features: [generators] function* g() {} var GeneratorPrototype = Object.getPrototypeOf(g).prototype; -assert.sameValue(GeneratorPrototype.next.name, "next"); - -verifyNotEnumerable(GeneratorPrototype.next, "name"); -verifyNotWritable(GeneratorPrototype.next, "name"); -verifyConfigurable(GeneratorPrototype.next, "name"); +verifyProperty(GeneratorPrototype.next, "name", { + value: "next", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/GeneratorPrototype/next/not-a-constructor.js b/js/src/tests/test262/built-ins/GeneratorPrototype/next/not-a-constructor.js index 49865588f8..3a8fd1b22f 100644 --- a/js/src/tests/test262/built-ins/GeneratorPrototype/next/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/GeneratorPrototype/next/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { function* g() {} let iterator = g(); new iterator.next(); -}, '`function* g() {} let iterator = g(); new iterator.next()` throws TypeError'); +}); reportCompare(0, 0); |