Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.

mocha-retry tests aren't working #6

Closed
bprodoehl opened this issue Dec 4, 2014 · 5 comments
Closed

mocha-retry tests aren't working #6

bprodoehl opened this issue Dec 4, 2014 · 5 comments

Comments

@bprodoehl
Copy link

I am so far unable to run your unit tests for the mocha-retry package itself. I'm just running npm install and then ./node_modules/.bin/mocha, expecting that to run what you have under the test/ folder, and I'm getting this:

/src/mocha-retry/node_modules/mocha/lib/mocha.js:154
  if (!this._ui) throw new Error('invalid interface "' + name + '"');
                       ^
Error: invalid interface "mocha-retry"
    at Mocha.ui (/src/mocha-retry/node_modules/mocha/lib/mocha.js:154:24)
    at Object.<anonymous> (/src/mocha-retry/node_modules/mocha/bin/_mocha:199:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

I have also tried replacing the mocha dependency in package.json with "https://github.com/giggio/mocha/archive/master.tar.gz" and with "^2.0.1", with the same result each time. It looks as though your pull requests have been merged into upstream mocha, so I figured 1.22 or 2.0.1 should work, but they're not for me.

@mattab
Copy link

mattab commented Mar 6, 2015

Dear developer,

thanks for creating mocha-retry - we need this badly for our open source analytics platform project http://piwik.org (github: https://github.com/piwik/piwik )

Short story: we take 200 screenshots of the Piwik app on each push, and we have about 3 screenshots that randomly fail because of small pixel differences... (tracked in matomo-org/matomo#6693 )

I tried to implement the mocha-retry as you can see here: https://github.com/piwik/piwik/compare/6693?expand=1

Unfortunately the CI build errors out with the following error:

Error: invalid interface "mocha-retry"

/home/travis/build/piwik/piwik/tests/lib/screenshot-testing/../../lib/mocha-2.1.0/mocha.js:1582

/home/travis/build/piwik/piwik/tests/lib/screenshot-testing/../../lib/mocha-2.1.0/mocha.js:6256

/home/travis/build/piwik/piwik/tests/lib/screenshot-testing/../../lib/mocha-2.1.0/mocha.js:6267

/home/travis/build/piwik/piwik/tests/lib/screenshot-testing/support/mocha-loader.js:76

/home/travis/build/piwik/piwik/tests/lib/screenshot-testing/support/mocha-loader.js:78

ReferenceError: Can't find variable: describe

/home/travis/build/piwik/piwik/tests/lib/screenshot-testing/support/app.js:77

../lib/screenshot-testing/run-tests.js:62

You can see build result here: https://travis-ci.org/piwik/piwik/jobs/53298159

We use Mocha 2.1.0

-> Do you maybe have any suggestion or tip to make this work?

@giggio
Copy link
Owner

giggio commented Mar 19, 2015

@mattab Yes, mocha needs to be updated for mocha-retry to work properly. You can see the discussion on the mocha github issues. I had submitted a PR, which was first accepted, then later rolled back.

@mattab
Copy link

mattab commented Mar 19, 2015

Hi @giggio thanks for the update!

Do you mean we should use your fork of mocha to make mocha-retry work? If so, we could try this. do you know if there's a chance they will merge it in main mocha in the future?

@giggio
Copy link
Owner

giggio commented Mar 22, 2015

Yes, my version worked, but broke the browser, they said. I haven't updated it since then. They said they would look into it, but never did. Maybe you would like to help and see what went wrong there? I never got to it, and now I am on a project on a different technology, I will not find time to work on this for quite a while.

@giggio
Copy link
Owner

giggio commented Aug 7, 2016

Closed because of #10.

@giggio giggio closed this as completed Aug 7, 2016
Repository owner locked and limited conversation to collaborators Aug 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants