Skip to content

Instantly share code, notes, and snippets.

@baconpat
Created October 18, 2012 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baconpat/3909107 to your computer and use it in GitHub Desktop.
Save baconpat/3909107 to your computer and use it in GitHub Desktop.
An example spec for use with Jasmine and Ext JS 4
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