Public Repository

Last pushed: a year ago
Short Description
Container for run tests in headless chrome
Full Description

Docker container with

  • nodejs 5.x
  • chrome

Example of usage

Create karma.conf.js

const webpack = require('webpack');

module.exports = function (config) {
    var confBuilder = require('./webpack.config.template');

    config.set({
        browsers: ['Chrome'],
        singleRun: true,
        frameworks: ['mocha', 'chai'],
        files: [
            'tests.webpack.js',
        ],
        preprocessors: {
            'tests.webpack.js': ['webpack', 'sourcemap'],
        },
        reporters: ['mocha'],
        plugins: [
            require('karma-webpack'),
            require('karma-mocha'),
            require('karma-chai'),
            require('karma-mocha-reporter'),
            require('karma-chrome-launcher'),
            require('karma-sourcemap-loader'),
        ],
        webpack: confBuilder,
        webpackServer: {
            noInfo: true,
        },
    });
};

create Dockerfile in the root of your project

FROM heymdall/karma-chrome-tests
COPY . /src
WORKDIR /src
CMD ./node_modules/.bin/karma start
Docker Pull Command
Owner
heymdall

Comments (0)