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

Git master version not working with jasmine-node #313

Closed
iqqmuT opened this Issue May 9, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@iqqmuT
Copy link

iqqmuT commented May 9, 2016

I installed git master version from frisby, but jasmine-node does not seem to work with it.

$ npm install git+https://github.com/vlucas/frisby.git jasmine-node@1.14.5
$ npm list --depth=0
/tmp/dir1
├── frisby@0.8.4 (git+https://github.com/vlucas/frisby.git#6233f25df53421a41ae67a12ead5e7903a10d5c0)
└── jasmine-node@1.14.5

Running this doesn't do anything, no output from jasmine-node:

$ jasmine-node .

It works with this setup though:

$ npm install frisby@0.8.5 jasmine-node@1.14.5
$ npm list --depth=0
/tmp/dir2
├── frisby@0.8.5
└── jasmine-node@1.14.5
$ jasmine-node .


Finished in 0 seconds
0 tests, 0 assertions, 0 failures, 0 skipped

The reason why I wanted to use git master version is that I'd like to use gulp, like mentioned in this issue: #173

@mtitolo

This comment has been minimized.

Copy link

mtitolo commented May 11, 2016

I'm having the same issue. It looks like the new minijasminenode2 package doesn't have an equivalent gulp package 😒

I've solved this using the latest published version with two small updates:

  1. Add jasmine = require('jasmine-node') at the top of frisby.js (yes this is bad ju-ju)
  2. npm link jasmine-node <--- this is what makes the jasmine installed globally accessible to frisby
$ gulp test
[21:40:42] Using gulpfile ~/Projects/picsnearme-web/hapi-test/Gulpfile.js
[21:40:42] Starting 'test'...
Running 1 spec.

Frisby Test: Ensure we get a list of users

        [ GET http://localhost:3000/users.json ]: failed

I'm going to play with this tomorrow and will hopefully get a branch up that works so other people don't have to hack the local files. There hasn't been a release in > 6 months, bug exists for over a year, so I doubt this will get fixed on the main branch anytime soon.

@mtitolo

This comment has been minimized.

Copy link

mtitolo commented May 11, 2016

Oops forgot one thing, which is strange. You also have to require('frisby') in the Gulpfile. This is very strange.

@mtitolo

This comment has been minimized.

Copy link

mtitolo commented May 13, 2016

So master is needed to get this working, because of bugs within the jasmine library used.

If you use gulp-jasmine-phantom instead of gulp-jasmine, the tests actually run with gulp.

$ gulp test
[20:02:47] Using gulpfile ~/Projects/picsnearme-web/hapi-test/Gulpfile.js
[20:02:47] Starting 'test'...
[20:02:47] Running Jasmine in Node
Started


Frisby Test: Ensure we get a list of users
  ✔
    [ GET http://localhost:3000/users ]




1 spec, 1 success
Finished in 0 seconds
[20:02:48] Finished 'test' after 250 ms
@vlucas

This comment has been minimized.

Copy link
Owner

vlucas commented Jul 26, 2017

The master branch is now Frisby v2.

@vlucas vlucas closed this Jul 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment