mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
1015 B
1015 B
Testing
Logging
JawsUtils.jawsDebug() offers the ability for writing debug logs to stdout. You can control the namespaces that get logged by setting the DEBUG env var per the [https://github.com/visionmedia/debug](npm debug) rules. If you want to see all namespaces set DEBUG=*
Running test cases
- Set env var
JAWS_ADMIN_AWS_PROFILE - Set env vars defined in
tests/config.js. By default if you do not setTEST_JAWS_EXE_CFno AWS resources will be created.- If you are going to run the tests that create aws resources, you will need to create a unit test project (via normal
jaws project create). Take the iam roles fromproject.jsonand set theTEST_JAWS_*_ROLEenv vars defined inconfig.js
- If you are going to run the tests that create aws resources, you will need to create a unit test project (via normal
- Make sure you have run
npm installfrom the jaws project root - Run the mocha test from the CLI (
mocha tests/all.js) or setup mocha test from your IDE. WebStorm allows you to run a debugger in the IDE for your test cases which is really handy to track down issues.