ember.js unit testing and integration testing

Asked By: Anonymous

I am exploring ember.js application testing. I came across following blog by Toran Billups
Integration testing your ember.js app with QUnit and Karma

When we do karma start it runs all the test found in test directory.

How can I run say tests in only one .js file?

thanks


Solution

Answered By: Anonymous

As @bk11425 suggested, simply modify the ‘files’ section in your karma.conf.js file from this

module.exports = function(karma) {
    karma.set({
        basePath: 'js',

        files: [
          "vendor/jquery/jquery.min.js",
          "vendor/handlebars/handlebars.js",
          "vendor/ember/ember.js",
          "vendor/jquery-mockjax/jquery.mockjax.js",
          "app.js",
          "tests/*.js",
          "templates/*.handlebars"
        ]

To something like this instead

module.exports = function(karma) {
    karma.set({
        basePath: 'js',

        files: [
          "vendor/jquery/jquery.min.js",
          "vendor/handlebars/handlebars.js",
          "vendor/ember/ember.js",
          "vendor/jquery-mockjax/jquery.mockjax.js",
          "app.js",
          "tests/mytestfile.js",
          "templates/*.handlebars"
        ]

Note- if you are doing integration testing please include the integration helper just above this single test file I showed above


Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno