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

Running multiple test function files #17

Closed
adnanmateenpk opened this issue May 30, 2016 · 6 comments
Closed

Running multiple test function files #17

adnanmateenpk opened this issue May 30, 2016 · 6 comments

Comments

@adnanmateenpk
Copy link

adnanmateenpk commented May 30, 2016

When i try to run multiple test files at a time it uses the last function (alphabetical order) for all the functions instead of using their respective functions

@adnanmateenpk adnanmateenpk changed the title Running multiple test files Running multiple test function files May 30, 2016
@JasonZecutiv
Copy link

JasonZecutiv commented Jun 8, 2016

I was having this same problem until I upgraded to 5.8. Now when I attempt to run all tests I now get 'Cannot find module', and is is trying to run tests for functions that I haven't created yet.

@JasonZecutiv
Copy link

JasonZecutiv commented Jun 8, 2016

I created the missing tests and still had problems with running multiple tests. I noticed that the new tests I created had an extra wrapper.init(mod) statement. Once I added that to all of my existing tests I was able to run all tests and everything now passes!

@adnanmateenpk
Copy link
Author

adnanmateenpk commented Jun 9, 2016

I have updated to 5.8 but i am still getting the same issue :|

the tests run fine individually, i have five test files,

create, delete, index, show, update

when every single test has its own function

but when i run all the tests at same time only 'update' test passes and i get this error for others

Uncaught AssertionError: expected [ConfigError: Missing region in config] to be an object
at test/create.js:35:29
at Response. (functions/update/handler.js:22:25)
or

TypeError: Cannot read property 'field' of undefined
at Object.module.exports.handler (functions/update/handler.js:6:24)
at Context. (test/delete.js:27:11)

should nt the last line i.e. response be 'functions/create/handlers.js' for create and so on ?

@rafaljanicki
Copy link
Contributor

Have you moved wrapper.init to before()?

@mpuittinen
Copy link
Contributor

Hi! Did you create the tests that are failing with the latest module version or with a version prior to that.
The fix for the issue is related to the creation of the the test files. wrapper.init() should be inside before() or in it(). i.e. the existing test cases would need to be fixed manually.

-Mikael

On 09 Jun 2016, at 12:49, Rafał Janicki notifications@github.com wrote:

Have you moved wrapper.init to before()?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #17 (comment), or mute the thread https://github.com/notifications/unsubscribe/AIARbBvxxG1QyIXrFN0yv4b9o9d82c9Iks5qJ-GvgaJpZM4Ip-ec.

@adnanmateenpk
Copy link
Author

adnanmateenpk commented Jun 9, 2016

yeah that was the fix thanks, the wrapper.init() was being called earlier thanks for all the help!!!

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

4 participants