AKIRA-MIYAKE / serverless-import-swagger

Import functions from OpenAPI spec file to serverless.yml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test passes falsely if successfully-generated outputs exists in test/src

exoego opened this issue · comments

Test code generates some outputs to test/src.
However, the generated outputs are not deleted after test finished, since teardown code are commented out for some reason.

after(() => {
// return del(path.resolve(appRoot.path, './test/src'));
});

Therefore, once outsputs are successfully generated, test passes falsely until test/src are deleted.
I think teardown code should be alive, so that contributor can test without deleting test/src every time.

Steps to reproduce

git clone https://github.com/AKIRA-MIYAKE/serverless-import-swagger.git sis_testing
cd sis_testing
npm install
npm test 
rm test/swagger.yaml
npm test

Test passes falsely though swagger.yaml does not exist.