Closed mikepack closed 9 years ago
@jejacks0n :eyes: :pray:
I think jquery is available to our repo through jquery-rails, fwiw. So I think a spec is possible.
Code looks good. I'm a bit skeptical that it's a good change though. Like, can I now make an invalid fixture, get a passing spec, and get different results in the real world if I used .insert or .html?
This was my struggle with the issue. I guess we'll find out. :)
Yeah, I'm struggling with that as well. It seems like a bad way of using fixtures, unless I'm misunderstanding the use case. Pulling JS down through a fixture seems poor for performance (because of script download/parse blocking), in the case of #387. Testing just the contents of an invalid element, without caring about the surrounding elements that make it valid, also seems like a bad idea and the tests should be moved to a higher level where it's tested against something valid, in the case of #382.
¯\_(ツ)_/¯
Support broken HTML with
$.parseHtml
. Can't really write a good test for this since Teaspoon doesn't ship with jQuery, but here is the test I built against, which fails without jQuery:Fixes #387 Fixes #382