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

Jasmine tests not running #2967

Closed
Souravirus opened this issue Jul 1, 2018 · 21 comments · Fixed by #2997
Closed

Jasmine tests not running #2967

Souravirus opened this issue Jul 1, 2018 · 21 comments · Fixed by #2997
Assignees
Labels
JavaScript testing issues are usually for adding unit tests, integration tests or any other tests for a feature

Comments

@Souravirus
Copy link
Member

Report is:
Running "/home/sourav/.phantomjs/2.1.1/x86_64-linux/bin/phantomjs" "/home/sourav/.rvm/gems/ruby-2.4.1/gems/jasmine-rails-0.14.7/lib/jasmine_rails/../assets/javascripts/jasmine-runner.js" "file:///home/sourav/Documents/gsoc/plots2/tmp/jasmine/runner.html?root=/home/sourav/Documents/gsoc/plots2&spec="
Running: file:///home/sourav/Documents/gsoc/plots2/tmp/jasmine/runner.html?root=/home/sourav/Documents/gsoc/plots2&spec=
Starting...

Finished

0 specs, 0 failures in 0.061s.

ConsoleReporter finished

No specs are running

@Souravirus Souravirus added testing issues are usually for adding unit tests, integration tests or any other tests for a feature JavaScript labels Jul 1, 2018
@Souravirus
Copy link
Member Author

@jywarren Have a look at this.

@jywarren
Copy link
Member

jywarren commented Jul 3, 2018 via email

@Souravirus
Copy link
Member Author

No, its not related to rails 5. As I have seen the commits before the rails 5.0 upgrade and it was not running even on them.

@jywarren
Copy link
Member

jywarren commented Jul 3, 2018 via email

@Souravirus
Copy link
Member Author

No not running locally also

@Souravirus
Copy link
Member Author

I was using the command as is used in the test rake spec:javascript

@jywarren
Copy link
Member

jywarren commented Jul 3, 2018

OK, good to know. Would you mind looking back at when this stopped working so we can pinpoint the commit that caused it?

@Souravirus
Copy link
Member Author

Yeah I would search for it. Looks like I have to use binary search for it. 😆 😆

@jywarren
Copy link
Member

jywarren commented Jul 3, 2018

yeah, sorry, it's a pain!

@Souravirus
Copy link
Member Author

no problem

@Souravirus
Copy link
Member Author

Here it occured due to this commit:
10ab833
Sadly, I was my own PR. But I haven't changed the jasmine test as you can see. What might be the problem?

@jywarren
Copy link
Member

jywarren commented Jul 3, 2018

hey, it's not a blame game, just a detective game! 😄 🔍

Is it somehow possible that the use of class Reset { overwrote a global variable that Jasmine uses, also called Reset? Could we try changing the name to something else, like EmailValidator?

@Souravirus
Copy link
Member Author

Yeah ok trying this fix and lets see what happens. Thanks for the help!!

@Souravirus
Copy link
Member Author

Nopes it didn't worked

@Souravirus
Copy link
Member Author

@jywarren now this is interesting, jasmine is finding the specs when run through web browser. Here is the screenshot:
screenshot from 2018-07-04 03-01-32

@Souravirus
Copy link
Member Author

I got something testdouble/jasmine-rails#220 . I guess since in that PR I used modern ES features that's why the phantomjs is unable to find the jasmine tests and it chokes. So, thats why I guess jasmine tests are not running. I think we must move on to another alternative. What do you think?

@jywarren
Copy link
Member

jywarren commented Jul 3, 2018 via email

@Souravirus
Copy link
Member Author

Yeah I will look at it about how to perfectly test javascript in rails

@jywarren
Copy link
Member

jywarren commented Jul 3, 2018 via email

@Souravirus
Copy link
Member Author

Souravirus commented Jul 6, 2018

I am not getting the perfect tests. Tried karma and teaspoon-jasmine but there are some issues with each of them.

@Souravirus
Copy link
Member Author

ok I am currently setting up mocha in rails app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScript testing issues are usually for adding unit tests, integration tests or any other tests for a feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants