Created
July 22, 2013 07:25
-
-
Save shoyan/6051917 to your computer and use it in GitHub Desktop.
jasmineのDOM操作のサンプル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("DOM操作", function() { | |
beforeEach(function() { | |
testDiv = document.createElement('div'); | |
testDiv.innerHTML = '<div id="test-node">test</div>'; | |
document.body.appendChild(testDiv); | |
}); | |
it("div#test-nodeが挿入できていること", function () { | |
var elementId = 'test-node'; | |
expect(document.getElementById(elementId)).not.toBeNull(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment