Support for bdd-lazy-vars
amitaymolko opened this issue · 0 comments
amitaymolko commented
I'm trying to get this plugin to work with: https://github.com/stalniy/bdd-lazy-var/
I forked the project and added -u option to set the mocha ui. (https://github.com/amitaymolko/serverless-mocha-plugin)
But I get an error when running the tests.
I'm running the tests like so: sls invoke test -u bdd-lazy-var/global
Error:
(node:74052) UnhandledPromiseRejectionWarning: TypeError: defineTests.apply is not a function
at SuiteTracker.execute (PROJECT/node_modules/bdd-lazy-var/global.js:504:19)
at SuiteTracker.trackSuite (PROJECT/node_modules/bdd-lazy-var/global.js:489:12)
at Suite.defineSuite (PROJECT/node_modules/bdd-lazy-var/global.js:480:19)
at Object.create (PROJECT/node_modules/mocha/lib/interfaces/common.js:140:19)
at context.describe.context.context (PROJECT/node_modules/mocha/lib/interfaces/bdd.js:42:27)
at detectSuite (PROJECT/node_modules/bdd-lazy-var/global.js:475:25)
at sandboxDescribe (PROJECT/test/sites.js:25:5)
at Suite.describe (PROJECT/test/lib/sandbox-describe.js:33:5)
at SuiteTracker.execute (PROJECT/node_modules/bdd-lazy-var/global.js:504:19)
at SuiteTracker.trackSuite (PROJECT/node_modules/bdd-lazy-var/global.js:489:12)
at Suite.defineSuite (PROJECT/node_modules/bdd-lazy-var/global.js:480:19)
at Object.create (PROJECT/node_modules/mocha/lib/interfaces/common.js:140:19)
at context.describe.context.context (PROJECT/node_modules/mocha/lib/interfaces/bdd.js:42:27)
at detectSuite (PROJECT/node_modules/bdd-lazy-var/global.js:475:25)
at sandboxDescribe (PROJECT/test/lib/sandbox-describe.js:4:10)
at Object.<anonymous> (PROJECT/test/sites.js:7:1)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module._load (PROJECT/node_modules/mock-require/index.js:30:22)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at PROJECT/node_modules/serverless-mocha-plugin/node_modules/mocha/lib/mocha.js:231:27
at Array.forEach (<anonymous>)
at Mocha.loadFiles (PROJECT/node_modules/serverless-mocha-plugin/node_modules/mocha/lib/mocha.js:228:14)
at Mocha.run (PROJECT/node_modules/serverless-mocha-plugin/node_modules/mocha/lib/mocha.js:536:10)
at myModule.runScripts.then (PROJECT/node_modules/serverless-mocha-plugin/index.js:308:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:74052) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Any ideas?