Open thg303 opened 3 years ago
Hi,
Use the 1.83.0 serverless version.
npm install -g serverless@1.83.0
Best
It's Strange, but I managed to make it work by using --function
instead of -f
like this:
sls create function --function testFunction --handler src/functions/testFunction.testFunction -p src/tests/
Yes it works :) Great!
Should be fixed with https://github.com/nordcloud/serverless-mocha-plugin/pull/151
@tdi this plugin seems to miss types for CLI options it defines, such functionality was at some point added with v2 of Serverless Framework, and is scheduled to be mandatory in v3. Is there any chance to have mentioned PR merged and published?
I'm having the same issue when using -f
but sls create function --function testFunction --handler src/functions/testFunction.testFunction -p src/tests/
works.
Your Environment Information --------------------------- Operating System: win32 Node Version: 14.15.4 Framework Version: 2.55.0 Plugin Version: 5.4.3 SDK Version: 4.2.6 Components Version: 3.15.1
I install the plugin using:
serverless plugin install --name serverless-mocha
when I try to create a function like this:sls create function -f testFunction --handler src/functions/testFunction.testFunction -p src/tests/
I get the following result:
It creates the function file at
src/functions/testFunction.testFunction.js
but theserverless.yaml
file changes are:and no test file is generated.