Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sirishasriramineni207 opened this issue Sep 10, 2018 · 0 comments
Open

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

sirishasriramineni207 opened this issue Sep 10, 2018 · 0 comments

Comments

@sirishasriramineni207
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant