diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index 1bccfdd2425b..bebe10b5f2f3 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -157,12 +157,12 @@ module.exports = { const result = await a * b; return result; }, - class: new class Bar { + class: new (class Bar { constructor() { this.array = [1, 2, 3]; } foo() {} - }, + })(), object: { baz: 'foo', bar: { diff --git a/website/versioned_docs/version-25.x/JestObjectAPI.md b/website/versioned_docs/version-25.x/JestObjectAPI.md index 043d51db4be8..614fdba67e78 100644 --- a/website/versioned_docs/version-25.x/JestObjectAPI.md +++ b/website/versioned_docs/version-25.x/JestObjectAPI.md @@ -153,12 +153,12 @@ module.exports = { const result = await a * b; return result; }, - class: new class Bar { + class: new (class Bar { constructor() { this.array = [1, 2, 3]; } foo() {} - }, + })(), object: { baz: 'foo', bar: { diff --git a/website/versioned_docs/version-26.x/JestObjectAPI.md b/website/versioned_docs/version-26.x/JestObjectAPI.md index 113b07bdc992..fbfef281e9c4 100644 --- a/website/versioned_docs/version-26.x/JestObjectAPI.md +++ b/website/versioned_docs/version-26.x/JestObjectAPI.md @@ -157,12 +157,12 @@ module.exports = { const result = await a * b; return result; }, - class: new class Bar { + class: new (class Bar { constructor() { this.array = [1, 2, 3]; } foo() {} - }, + })(), object: { baz: 'foo', bar: { diff --git a/website/versioned_docs/version-27.0/JestObjectAPI.md b/website/versioned_docs/version-27.0/JestObjectAPI.md index 1bccfdd2425b..bebe10b5f2f3 100644 --- a/website/versioned_docs/version-27.0/JestObjectAPI.md +++ b/website/versioned_docs/version-27.0/JestObjectAPI.md @@ -157,12 +157,12 @@ module.exports = { const result = await a * b; return result; }, - class: new class Bar { + class: new (class Bar { constructor() { this.array = [1, 2, 3]; } foo() {} - }, + })(), object: { baz: 'foo', bar: {