diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index bebe10b5f2f3..1e31360b4985 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -154,7 +154,7 @@ module.exports = { return a * b; }, asyncFunction: async function asyncSquare(a, b) { - const result = await a * b; + const result = (await a) * b; return result; }, class: new (class Bar { diff --git a/website/versioned_docs/version-25.x/JestObjectAPI.md b/website/versioned_docs/version-25.x/JestObjectAPI.md index 614fdba67e78..58b4de2f9452 100644 --- a/website/versioned_docs/version-25.x/JestObjectAPI.md +++ b/website/versioned_docs/version-25.x/JestObjectAPI.md @@ -150,7 +150,7 @@ module.exports = { return a * b; }, asyncFunction: async function asyncSquare(a, b) { - const result = await a * b; + const result = (await a) * b; return result; }, class: new (class Bar { diff --git a/website/versioned_docs/version-26.x/JestObjectAPI.md b/website/versioned_docs/version-26.x/JestObjectAPI.md index fbfef281e9c4..ae980e80c9ee 100644 --- a/website/versioned_docs/version-26.x/JestObjectAPI.md +++ b/website/versioned_docs/version-26.x/JestObjectAPI.md @@ -154,7 +154,7 @@ module.exports = { return a * b; }, asyncFunction: async function asyncSquare(a, b) { - const result = await a * b; + const result = (await a) * b; return result; }, class: new (class Bar { diff --git a/website/versioned_docs/version-27.0/JestObjectAPI.md b/website/versioned_docs/version-27.0/JestObjectAPI.md index bebe10b5f2f3..1e31360b4985 100644 --- a/website/versioned_docs/version-27.0/JestObjectAPI.md +++ b/website/versioned_docs/version-27.0/JestObjectAPI.md @@ -154,7 +154,7 @@ module.exports = { return a * b; }, asyncFunction: async function asyncSquare(a, b) { - const result = await a * b; + const result = (await a) * b; return result; }, class: new (class Bar {