Skip to content

Commit

Permalink
Rework to only require stack
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Geller committed Feb 12, 2021
1 parent 8a0ee36 commit 6ebe629
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/constructs/core/stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ import { TrackingTag } from "../../constants/library-info";
import { GuStack } from "./stack";

describe("The GuStack construct", () => {
it("should be able to take stack and stage values as props", function () {
const stack = simpleGuStackForTesting({ stack: "some-stack", stage: "some-stage" });
it("requires passing the stack value as props", function () {
const stack = simpleGuStackForTesting({ stack: "some-stack" });
expect(stack.stack).toEqual("some-stack");
expect(stack.stage).toEqual("some-stage");

const json = SynthUtils.toCloudFormation(stack) as SynthedStack;

expect(json.Parameters).toBeUndefined();
expect(json.Parameters).toEqual({
Stack: {
Type: "String",
Description: "Name of this stack",
Default: "deploy",
},
});
});

it("can accept only one of stack or stage", function () {
Expand Down

0 comments on commit 6ebe629

Please sign in to comment.