Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for bdd-lazy-vars #109

Open
amitaymolko opened this issue May 6, 2019 · 0 comments
Open

Support for bdd-lazy-vars #109

amitaymolko opened this issue May 6, 2019 · 0 comments

Comments

@amitaymolko
Copy link

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?

@amitaymolko amitaymolko changed the title Work with bdd-lazy-vars Support for bdd-lazy-vars May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant