GithubHelp home page GithubHelp logo

egor-smirnov / karma-commonjs-coffee Goto Github PK

View Code? Open in Web Editor NEW

This project forked from karma-runner/karma-commonjs

0.0 2.0 0.0 401 KB

A Karma plugin. Test CommonJS modules with CoffeeScript support.

License: MIT License

CoffeeScript 13.64% JavaScript 86.36%

karma-commonjs-coffee's Introduction

Build Status

karma-commonjs-coffee

This is fork of [karma-commonjs] (http://github.com/karma-runner/karma-commonjs) which has better support of CoffeeScript including appropriate CoffeeScript coverage.

For more information about what karma-commonjs is for, please visit this page

Under development now, won't work as it should at the moment :(

Installation

The easiest way is to keep karma-commonjs-coffee as a devDependency:

npm install karma-commonjs-coffee --save-dev

which should result in the following entry in your package.json:

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-commonjs-coffee": "~0.2"
  }
}

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    frameworks: ['jasmine', 'commonjs'],
    files: [
      // your tests, sources, ...
    ],

    preprocessors: {
      '**/*.js': ['commonjs']
    }
  });
};

Additionally you can specify a root folder (relative to project's directory) which is used to look for required modules:

commonjsPreprocessor: {
  modulesRoot: 'some_folder'  
}

When not specified the root folder default to the karma.basePath/node_modules configuration option.

Links

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.