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

fix: don't run test/*.spec.js files automatically in Browsers #202

Closed
wants to merge 1 commit into from

Commits on Mar 1, 2018

  1. fix: don't run test/*.spec.js files automatically in Browsers

    For Browsers we use webpack. Karma will create a bundle for every file
    that is specified as entry point. This may take lots of resources (see
    ipfs-inactive/js-ipfs-http-client#683 for more information).
    
    The solution is to have only a single entry point, `test/browser.js`,
    which will then be responsible to create the bundle with all the tests.
    
    BREAKING CHANGE: Without bundling all tests in `test/browser.js` the
    tests might not run. The bundling can be done like this:
    
        // This is webpack specific. It will create a single bundle
        // out of all files ending in ".spec.js" within the "test"
        // directory and all its subdirectories.
        'use strict'
        const testsContext = require.context('.', true, /\.spec\.js/)
        testsContext.keys().forEach(testsContext)
    vmx committed Mar 1, 2018
    Configuration menu
    Copy the full SHA
    0fe34b5 View commit details
    Browse the repository at this point in the history