jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Teaspoon and angular #309

Closed samu closed 9 years ago

samu commented 9 years ago

We are experiencing a problem when using teaspoon with angular. We reported a bug over at angular, but it seems the problem is being caused by teaspoon as we couldn't reproduce it without teaspoon in place. I understand that angular isn't officially supported, so i'd like to do some investigation and hopefully get this to work.

I'm not sure what exactly teaspoon does or what needs to be done to make specific frameworks work. Could you please provide me with some starting points? Also, what i've seen from debugging the issue, in our specific case the .data() api introduced with jquery is being used. Is it possible that teaspoon overwrites certain behaviours of jquery or does it mix in certain methods on js objects that might clash with the api of angular?

jejacks0n commented 9 years ago

No, teaspoon is very raw, and in fact clones copies of various global variables (things defined on window) to avoid any stubbing messing things up.

There is one small place where teaspoon does use $, and so can give you back a jQuery object. https://github.com/modeset/teaspoon/blob/master/app/assets/javascripts/teaspoon/base/fixture.coffee#L77

Unsure what else I can do to help without more information. Would love to have angular support added properly, but that was attempted, but was not polished enough for me to continue to support. None of the maintainers have used Angular on a project yet, and so that too makes maintaining it difficult -- without being very knowledgeable in a thing, it's hard to support it at a test level you know?