I want to write some standalone Unit-Test for my ExtJS6 UI-Component Classes from a package and have a problem to load the application-all.css because in this case I don't really have a application. And if I want to test a Class, how could the corresponding scss be loaded for this class.
My harness looks like this:
harness.configure({
title: 'my-common tests',
loaderPath : {
'My.common': '../src'
},
preload : [
// version of ExtJS used by your application
// (not needed if you use Sencha Cmd which builds a complete 'all-file' including Ext JS itself)
'../../../../applications/MyApplication/bootstrap.css', //dependency to Applications CSS
'../../../../ext/build/ext-all-debug.js',
{
text: harness.getLoaderPathHook() //get loaderPath config before executing load mocked data
}
]
});
harness.start(
{
group : 'Unit',
requires: [
'My.common.ui.DisplayMessage'
],
items : [
'unit-tests/UI-1_dialogBox.t.js'
]
}
);
Is there a better way for testing package classes?