Austin
11/23/2021, 6:43 PMnpx sst test
against a non-default stage (something other than dev). I’ve tried npx sst test --stage stageName
which the documentation seems to indicate should work, but I just get an error that the Jest CLI doesn’t support that option. What am I missing?Frank
Frank
Austin
11/23/2021, 10:37 PMMayowa
12/31/2021, 12:27 AMstage
variable to jest and the jest cli doesn't expect a stage
variable.
@Austin You probably want to mock whatever values you feel would change between stages and not rely on live data for your tests. Do you have a specific use-case you'd like to share?
If there's no unique case, we want to remove the stage option from the test command so we don't encourage this testing anti-pattern @Frank. Might need a new issue to track that.Austin
01/04/2022, 6:15 PMMayowa
01/05/2022, 3:10 PMstage
option in their cli.