karma-requirejs icon indicating copy to clipboard operation
karma-requirejs copied to clipboard

how to test when we have more than one spec.js file

Open sirishasriramineni207 opened this issue 6 years ago • 0 comments

Expected behaviour

I am new to require.js with karma. my tree s like below image

it should pass all the tests.

Actual behaviour

when there is one spec.js for example aSpec.js it is running fine. when adding an other spec.js, karma is not running properly and giving errors in aSpec.js. This is weird.

Environment Details

frameworks: ['jasmine', 'requirejs'],

  • Karma version (output of karma --version): image

  • Relevant part of your karma.config.js file module.exports = function (config) { config.set({

    // base path, that will be used to resolve files and exclude basePath: '',

    // frameworks to use frameworks: ['jasmine', 'requirejs'],

    // list of files / patterns to load in the browser files: [ {pattern: 'test//*Spec.js', included: false}, {pattern: 'src//*.js', included: false}, 'submit_po3_validations.js', 'ups_lib.js', 'submit_po3.js', 'so_entry_checks_client.js', 'so_entry_checks_ue.js', './test/test_so_ue.js', 'submit_lib.js', 'library.js', 'set_dc_on_so_ue.js', 'set_cust_info_ue.js', 'send_email_to_customer.js', 'create_marketplace_cust_dep_ue.js', './test/test_library.js', './test/test_set_cust_info_ue.js', './test/test_send_email_to_customer.js', './test/submit_po_tests.js', './test/submit_po_validations_tests.js', './test/test_so_entry_checks_client.js', './test/submit_lib_tests.js', './test/TestSetDCSalesOrder.js', './test/ups_lib_tests.js', './test/test_create_marketplace_cust_dep_ue.js', 'test/test-main.js', ],

    exclude: [ ],

    reporters: ['dots', 'junit'],

    // web server port port: 9876,

    // enable / disable colors in the output (reporters and logs) colors: true,

    // level of logging // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG logLevel: config.LOG_INFO,

    // enable / disable watching file and executing tests whenever any file changes autoWatch: true, browsers: [//'PhantomJS', 'Chrome'],

    captureTimeout: 60000,

    // Continuous Integration mode // if true, it capture browsers, run tests and exit singleRun: true }); };

Any ideas what is going on here. Thanks

sirishasriramineni207 avatar Sep 10 '18 20:09 sirishasriramineni207