From 5042f7489deccabde5748ac1c1544b0c976d43be Mon Sep 17 00:00:00 2001 From: Lee Byonghun Date: Sun, 2 Apr 2023 23:46:28 +0900 Subject: [PATCH] chore(docs): use `Synth` than `SynthScope` for #2755 Modify docs for beginners, in #2755. --- website/docs/cdktf/test/unit-tests.mdx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/website/docs/cdktf/test/unit-tests.mdx b/website/docs/cdktf/test/unit-tests.mdx index 89d11ddcc7..5b34adb456 100644 --- a/website/docs/cdktf/test/unit-tests.mdx +++ b/website/docs/cdktf/test/unit-tests.mdx @@ -50,19 +50,19 @@ import MyApplicationsAbstraction from "../app"; // Could be a class extending fr describe("Unit testing using assertions", () => { it("should contain a container", () => { - expect( - Testing.synthScope((scope) => { - new MyApplicationsAbstraction(scope, "my-app", {}); - }) - ).toHaveResource(Container); + const app = Testing.app(); + const stack = new MyApplicationsAbstraction(app, "my-app", {}); + const synthesized = Testing.synth(stack); + + expect(synthesized).toHaveResource(Container); }); it("should use an ubuntu image", () => { - expect( - Testing.synthScope((scope) => { - new MyApplicationsAbstraction(scope, "my-app", {}); - }) - ).toHaveResourceWithProperties(Image, { name: "ubuntu:latest" }); + const app = Testing.app(); + const stack = new MyApplicationsAbstraction(app, "my-app", {}); + const synthesized = Testing.synth(stack); + + expect(synthesized).toHaveResourceWithProperties(Image, { name: "ubuntu:latest" }); }); }); ```