Skip to content

karma-browserify support? #27

@ghost

Description

Is it possible to use this lib with karma-browserify? It does not seem to work. I am trying with this karma.conf.js:

module.exports = function (config) {
    config.set({
        plugins: [
            "karma-browserify",
            "karma-chrome-launcher",
            "karma-mocha"
        ],
        frameworks: ["browserify", "mocha"],
        files: [
            "yadda.js",
            "index.js",
            "lib/**/*.js",
            {pattern: "lib/**/!(*.js)", included: false},
            "features/**/*.js",
            {pattern: "features/**/!(*.js)", included: false}
        ],
        preprocessors: {
            "index.js": ["browserify"],
            "yadda.js": ["browserify"],
            "lib/**/*.js": ["browserify"],
            "features/**/*.js": ["browserify"]
        },
        client: {
            mocha: {
                reporter: "html",
                ui: "bdd"
            }
        },
        browserify: {
            debug: true,
            transform: ["require-globify"]
        },
        browsers: ["Chrome"],
        reporters: ["progress"],
        port: 9876,
        colors: true,
        logLevel: config.LOG_INFO,
        autoWatch: false,
        captureTimeout: 6000,
        singleRun: true
    });
};

and I got bundle error by adding a function to the yadda.js file

function fixDynamicRequire() {
    require('./features/**/*.js', {mode: "expand"});
}

What am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions