Paul Swail
05/20/2022, 11:49 AMvitest
is the test runner bundled in the starter templates. Is that what most of you are using? It’s the first I’ve heard of this framework, having mainly used Jest. Looking at the docs it looks the same API as Jest. Any gotchas to be aware of if switching to this from Jest?thdxr
05/20/2022, 12:02 PMPaul Swail
05/20/2022, 12:02 PMPaul Swail
05/20/2022, 12:03 PMPaul Swail
05/20/2022, 12:03 PMthdxr
05/20/2022, 12:04 PMPaul Swail
05/20/2022, 12:04 PMsst start
triggered by hitting Enter to write their outputs to a file that I can read from my tests? Or does it have to explicitly go through the sst deploy
command?Paul Swail
05/20/2022, 12:05 PMthdxr
05/20/2022, 12:05 PMthdxr
05/20/2022, 12:06 PMPaul Swail
05/20/2022, 12:06 PMthdxr
05/20/2022, 12:07 PMPaul Swail
05/20/2022, 12:07 PMthdxr
05/20/2022, 12:10 PMthdxr
05/20/2022, 12:11 PMPaul Swail
05/20/2022, 12:11 PMssm-helper
util type modules for thisPaul Swail
05/20/2022, 12:11 PMPaul Swail
05/20/2022, 12:12 PMPaul Swail
05/20/2022, 12:13 PM'@serverless-stack/node/config'
module I meanthdxr
05/20/2022, 12:13 PMthdxr
05/20/2022, 12:13 PMPaul Swail
05/20/2022, 12:20 PMthdxr
05/20/2022, 12:21 PMthdxr
05/20/2022, 12:21 PMPaul Swail
05/20/2022, 12:24 PMPaul Swail
05/20/2022, 12:26 PM.sst/stage
file) ?Paul Swail
05/20/2022, 12:27 PMthdxr
05/20/2022, 12:29 PMimport { State } from "@serverless-stack/core"
State.getStage(process.cwd())
Paul Swail
05/20/2022, 12:48 PMconst readStackConfig = () => {
const stackOutputs = JSON.parse(
readFileSync(join(__dirname, '../../../../stacks/stack-outputs.json')).toString()
)
const stackName = `${State.getStage(process.cwd())}-sst-twitter-exporter-MyStack`
return stackOutputs[stackName]
}
Paul Swail
05/20/2022, 12:51 PMthdxr
05/20/2022, 12:51 PMYounes El Attar
05/30/2022, 10:47 PM