nordcloud / serverless-jest-plugin

Plugin for Serverless Framework which adds support for test-driven development using Jest
MIT License
120 stars 51 forks source link

serverless.classes.Variables is not a constructor #51

Open EmmanDizon opened 2 years ago

EmmanDizon commented 2 years ago

Error when executing invoke test

my sample invoke command: serverless invoke test --stage dev --region us-east-1 -f getPartners

after hitting enter:

Error: TypeError: serverless.classes.Variables is not a constructor at C:\Node JS Self Learnings\CICO boilerplate\node_modules\serverless-jest-plugin\lib\run-tests.js:13:18 at Promise._execute (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\debuggability.js:384:9) at Promise._resolveFromExecutor (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\promise.js:518:18) at new Promise (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\promise.js:103:10) at runTests (C:\Node JS Self Learnings\CICO boilerplate\node_modules\serverless-jest-plugin\lib\run-tests.js:8:3) at ServerlessJestPlugin. (C:\Node JS Self Learnings\CICO boilerplate\node_modules\serverless-jest-plugin\index.js:97:23) at ServerlessJestPlugin.tryCatcher (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromiseCtx (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\promise.js:641:10) at _drainQueueStep (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\async.js:97:12) at _drainQueue (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (C:\Node JS Self Learnings\CICO boilerplate\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (node:internal/timers:466:21)

leosantosw commented 1 year ago

+1

akhil1672 commented 1 year ago

+1

pacholoamit commented 11 months ago

up