Coder Social home page Coder Social logo

karma-dart's Introduction

Adapter for the Dart unittest testing framework.

For more information on Karma-runner see the homepage.

Getting Started

You'll need node.js: http://nodejs.org/download/

Install karma and karma-dart adapter npms:

npm install karma-dart

Refer to npm install documentation for more details and install options.

and you'll need the following dependencies in your pubspec.yaml

unittest: any
browser: any

The following is an example of karma config.

module.exports = function(config) {
  config.set({
    basePath: '.',
    frameworks: ['dart-unittest'],

    // list of files / patterns to load in the browser
    // all tests must be 'included', but all other libraries must be 'served' and
    // optionally 'watched' only.
    files: [
      'test/*.dart',
      {pattern: '**/*.dart', watched: true, included: false, served: true},
      'packages/browser/dart.js',
      'packages/browser/interop.js'
    ],

    autoWatch: true,

    // If browser does not capture in given timeout [ms], kill it
    captureTimeout: 5000,

    plugins: [
      'karma-dart'
    ]
  });
};

You can run karma from the local folder:

node node_modules/karma/bin/karma start karma-dart.conf

or if you installed it with -g flag just

karma start karma-dart.conf

Then just open http://localhost:9876/ in Dartium.

Known Limitations/Issues

  • Missing Dartium launcher.
  • Each test file must be a library -- due to the nature of the test runner, this is required.

karma-dart's People

Contributors

cbracken avatar chirayuk avatar jbdeboer avatar pavelgj avatar vojtajina avatar

Watchers

 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.