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
Tests stops at "mocha:test" #2355
Comments
I do have that issue sometimes too, but not on every machine. Currently on a win10, node 8.11.3, npm 6.2.0 it runs all tests without hanging. Will report on it once I encounter it again. |
@rejas When I update grunt-mocha to latest version, I get proper output but a lot of errors. I suppose setting larger version of grunt-mocha isn’t desirable right now? What about using different runner for browser tests? For example, Karma is standard for these things so maybe we could use it? Also, PhantomJS is deprectaed and I didn’t see any support for using another modern headless solution like Puppeteer with Gunt, but karma-chrome-launcher has support for that. |
@niksy yeah, the test suite is not really upgrade friendly (tried to update mocha like you did with similar results). grunt-mocha isnt also very responsive to PRs. |
@rejas I would definitely go the route of setting up tests with minimal architecture changes, so only browser tests in Karma for now and then we will see for anything else later. I have experience with Karma (on daily basis I would say :D) and I can set up test environment with Puppeteer. I suppose it would be too much work to do that since Mocha is browser friendly, but it remains to be seen :) I don’t know when this will be ready since I’m going on vacation for 2 weeks, but in the meantime if anything changes with current implementation, great! If not, I will try to create minimal PoC with Karma. |
Have a nice vacation, those test issue probably wont go anywhere (it works somehow :-) |
Will read a little about testing in the meantime, will need it for other projects (and work) too. Maybe I pick up work on the update_chai branch again where I only try to replace the old expect.js lib with chai.js. Still two strange errors in it though, not sure where they come from (maybe mocha?) So, yeah that might be a starting point for you too? Will need a node and brwoser based environment as far as I understand the grunt / code correctly. And what do you think about jest by the way? |
@rejas So… I actually had some time and I whipped up initial conversion to Karma runner :D You can see it here: https://github.com/niksy/Modernizr/commit/1f404956 Every test passes in Chrome, so testing in other browsers is a process of setting up additional launchers and setting up Sauce Labs support. This still needs coverage reporting and integration tests but we’re getting somewhere :D As for Jest… I don’t have any experience with Node testing frameworks other that Mocha, and I think Jest still doesn’t have proper real browser support, and I think Modernizr needs that. So, what do you think? And @patrickkettner, what do you think about switch to Karma runner for tests? |
Open to it, historically we didn't because it crashed in older browsers which is one of the more popular situations to use modernizr
… On Aug 2, 2018, at 3:58 AM, Ivan Nikolić ***@***.***> wrote:
So… I actually had some time and I whipped up initial conversion to Karma runner :D
You can see it here: ***@***.***
Every test passes in Chrome, so testing in other browsers is a process of setting up additional launchers and setting up Sauce Labs support.
This still needs coverage reporting and integration tests but we’re getting somewhere :D
As for Jest… I don’t have any experience with Node testing frameworks other that Mocha, and I think Jest still doesn’t have proper real browser support, and I think Modernizr needs that.
So, what do you think? And @patrickkettner, what do you think about switch to Karma runner for tests?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@patrickkettner Ah, I see. So maybe we should still keep original implementation, but fix hanging tests? I suppose browsers defined in Sauce configuration are browsers which are used for testing. Maybe we could try to run tests on those browsers and see how it behaves? |
Not sure if this is related, but I saw this issue was still open and I'm now getting the following in my mocha:test task when running
Tried updating grunt-mocha but got way more errors/warnings so reverted back to what's currently in use. Also tried installing grunt-mocha-phantomjs to no avail. Node 8.12.0 Any known way to resolve this? Thanks in advance! |
@escodel I have the same versions and can run |
@rejas Yep, Win10 for me too. I’m thinking another package might’ve updated the version/path for PhantomJS. Will check when I get time later today. |
Weird, I have this issue only on my mac book.... |
(and yeah, upgrading grunt/mocha leads to another path full of errors, that bug is not for the faint of heart)) |
Alright so I figured out the issue... kind of. |
Any news on updating phantom @escodel ? |
@rejas I think it was an installation error on my part. Conflicting versions. It worked once I un/re-installed. |
@escodel darn, I was hoping to find someone who knows a fix to the tests dont run on node10 and some other setups.... :-( |
Fixed via #2429 |
When running on Node 8, tests stop at
mocha:test
task.The text was updated successfully, but these errors were encountered: