httpbackend icon indicating copy to clipboard operation
httpbackend copied to clipboard

Tests failing due to dependency issues in npm3

Open chrisuehlinger opened this issue 10 years ago • 3 comments

Hey there! I've been using httpbackend at work with my automated protractor tests, and I've been very pleased with it, but we've started having problems recently as a result of dependency issues. After sorting through which dependency caused the issue, I was able to create a reduced test case that demonstrated the problem, here are the steps to reproduce:

OS: Windows 7 (although this may happen on Mac OS X too, I haven't tested) Node Version: 4.2.2 NPM Version: 3.3.12

  1. Go to https://angularjs.org/ and create the 2 files described in the tutorial.
  2. In the project directory, run npm install http-backend protractor
  3. Run the tests using the version of protractor that was installed, like so: ./node_modules/.bin/protractor ./config.js
  4. You should see the following error message, followed by a stack trace that lads to \node_modules\selenium-webdriver\lib\webdriver\promise.js:112:9:
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
Started
F

Failures:
1) angularjs homepage todo list should add a todo
  Message:
    Failed: Unimplemented function: "then"

I think this may have to do with some of the dependencies that your project is relying on, which seem to include an old version of protractor.

I'm also getting errors when performing installs with npm3, which indicate that grunt-connect relies on grunt as a peerDependency. Looking through your package.json, it looks like you may be able to move the grunt and mocha related dependencies into devDependencies and make the most recent version of protractor into a peerDependency.

If you'd like, I can do this myself and submit a Pull Request.

Thanks for all the hard work! -Chris

chrisuehlinger avatar Nov 06 '15 21:11 chrisuehlinger

Do you have the time to do the pull request ? Or I will try to do this this week end

nchaulet avatar Nov 06 '15 22:11 nchaulet

Sure, I’ll give it a shot

On Nov 6, 2015, at 5:04 PM, Nicolas Chaulet [email protected] wrote:

Do you have the time to do the pull request ? Or I will try to do this this week end

— Reply to this email directly or view it on GitHub https://github.com/nchaulet/httpbackend/issues/14#issuecomment-154556224.

chrisuehlinger avatar Nov 06 '15 22:11 chrisuehlinger

Thanks

nchaulet avatar Nov 06 '15 22:11 nchaulet