Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Conversation

@jcouyang
Copy link
Contributor

you can write your fixture like this

<div id="anchor_01"><script src="spec/fixtures/javascripts/jasmine_javascript_test.js"></script></div>

if the script contains event binding like

$(function (){ $('#anchor_01').click(function(){ $(this).addClass('foo'); }) });

the even will actually bind to fixture so you can write some jasmine test like

$('#anchor_01').click()
expect($("#anchor_01")).toHaveClass('foo')

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant