Results 1 to 3 of 3

Thread: ExtJS Unittesting Pakages Independently

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    86

    Default ExtJS Unittesting Pakages Independently

    Hi All,

    In my application I'm using Karma for unit-testing.
    Now, I've a requirement where I've to write and execute packages(Which are in my application) independently.


    What is the good way to load Ext framework?? (as packages won'e contain Ext folder)
    As packages won't contain index.html we would need to create Viewport/document dynamically? What would be the better way for this??

    Note: Sencha Test is excluded

  2. #2
    Sencha User
    Join Date
    Oct 2014
    Posts
    14

    Default

    The main problem here would probably be, that Ext.define will not work without the Ext framework. The code you want to test is probably located in Ext classes and will therefore not be accessible which makes it impossible to test those.
    So you will need at least this part of the framework.

    If you are open to include the framework from a different location you can simply do so using a precompiled version of ext.
    You can then load your code and instantiate the classes you want to test.
    Why do you need a viewport for unit tests?

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    86

    Default

    Quote Originally Posted by jnugh View Post
    The main problem here would probably be, that Ext.define will not work without the Ext framework. The code you want to test is probably located in Ext classes and will therefore not be accessible which makes it impossible to test those.
    So you will need at least this part of the framework.

    If you are open to include the framework from a different location you can simply do so using a precompiled version of ext.
    You can then load your code and instantiate the classes you want to test.
    Why do you need a viewport for unit tests?
    Thanks for your reply jnugh.

    I've successfully configured Karma for packages by pre loading ext dependencies.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •