Giter Club home page Giter Club logo

karma-jasmine-phantomjs-docker's Introduction

Jasmine tests + Karma + PhantomJS in Docker

Run Jasmine tests using Karma and PhantomJS in a Docker container.

Usage

docker run --rm -it -v $PWD:/opt/karma hochzehn/karma-jasmine-phantomjs

Run this from your project root directory, or wherever your karma.conf.js is located.

Plugins / Reporter

junit

This container supports junit report generation. Apply in karma.conf.js like this:

reporters: ['junit'],

junitReporter: {
    outputDir: 'test-reports/',
    outputFile: 'junit.xml',
    useBrowserName: false
}

Coverage

This container supports code coverage. Apply in karma.conf.js like this:

reporters: ['coverage'],

preprocessors: {
    'path/to/src/**.js': 'coverage'
},

coverageReporter: {
    reporters: [
        { type: 'text-summary' },
        { type: 'html', dir: 'test-reports' },
        { type: 'clover', dir: 'test-reports', subdir: '.', file: 'clover.xml' }
    ]
},

You probably want to ignore /test-reports from your CVS as well.

Development

Build

docker build -t karma-jasmine-phantomjs .

Run

docker run --rm -it -v $PWD:/opt/karma karma-jasmine-phantomjs

karma-jasmine-phantomjs-docker's People

Contributors

jsantiago avatar janpapenbrock avatar mortonfox avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.