mirror of https://github.com/tc39/test262.git
Fix async generator test templates
- Insert a missing .next() call - Avoid overlapping names used in test cases Case files like `src/dstr-binding/ary-ptrn-elem-ary-elision-init.case` are already setting bindings named `g`. Renaming them in the templates prevents overlapping names.
This commit is contained in:
parent
73c2d51734
commit
dcfcd17ae7
|
@ -19,7 +19,7 @@ flags: [async]
|
|||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* g(/*{ elems }*/ = /*{ vals }*/) {
|
||||
f = async function* h(/*{ elems }*/ = /*{ vals }*/) {
|
||||
/*{ body }*/
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
|
|
@ -19,7 +19,7 @@ flags: [async]
|
|||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* g(/*{ elems }*/) {
|
||||
f = async function* h(/*{ elems }*/) {
|
||||
/*{ body }*/
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
|
|
@ -48,6 +48,6 @@ class C {
|
|||
}
|
||||
};
|
||||
|
||||
new C().method(/*{ vals }*/).then(() => {
|
||||
new C().method(/*{ vals }*/).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
||||
|
|
|
@ -17,7 +17,7 @@ info: |
|
|||
---*/
|
||||
|
||||
var f;
|
||||
f = async function* g(/*{ elems }*/ = /*{ vals }*/) {
|
||||
f = async function* h(/*{ elems }*/ = /*{ vals }*/) {
|
||||
/*{ body }*/
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue