Created
October 18, 2012 00:04
-
-
Save baconpat/3909107 to your computer and use it in GitHub Desktop.
An example spec for use with Jasmine and Ext JS 4
This file contains 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
Ext.require("MyApp.widget.MyWidget"); | |
describe("MyApp.widget.MyWidget", function() { | |
var widget; | |
beforeEach(function() { | |
widget = Ext.create("MyApp.widget.MyWidget", { | |
renderTo: "test", | |
value: "Some Initial Value", | |
}); | |
}); | |
afterEach(function() { | |
Ext.destroy(widget); | |
}); | |
it("displays the initial value", function() { | |
expect($('#test .display').text()).toEqual("Some Initial Value"); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment