I have setup a new ExtJs Project and want to test it with Netbeans and JSDT + adapter and an html test runner.
This is my file structure:
root
- config
-- jsTestDriver.conf
- public
-- application
--- controller, model, store, view
-- ext // ExtJS lib.
-- test
--- lib
---- jasmine + jstd-adapter
-- unit // Tests
The Jasmine spec runner (/test/SpecRunner.html
) works fine, but the Netbeans JSTD shows the following error:
TypeError: Cannot read property 'launched' of null
What is wrong?
Here's the application init code:
Ext.onReady(function () {
testApp = Ext.create('App.Application', {}, this);
jasmine.getEnv().addReporter(new jasmine.TrivialReporter());
jasmine.getEnv().execute();
});
Ext.define('App.Application', {
extend: 'Ext.app.Application',
// ...
and the tests:
describe("Basic Assumptions", function () {
it("has ExtJS4 loaded", function () {
expect(Ext).toBeDefined();
expect(Ext.getVersion()).toBeTruthy();
expect(Ext.getVersion().major).toEqual(4);
});
});
describe('BmKernel Application', function () {
it('is launched', function () {
expect(testApp).toBeDefined();
expect(testApp.launched).toBeTruthy();
});
});