Perform basic test automatically before upload

Is there are an easy way to have sls run a (unit) test automatically when I run sls deploy (with or without a function name) ?

I’m finding a few times I’ll make a minor change, introduced a typo, but not find out till after I’ve waited for the upload, deploy and then hit the API itself.

I assume that’s no then.

We’ll have to stick to telling people to run

npm tests && sls deploy

which is less elegant.

Hmm, maybe https://github.com/uswitch/serverless-hooks-plugin is what I want, with a hook that runs our gulp test task ?