Giter Club home page Giter Club logo

karma-msl's Introduction

karma-msl

Plugin for Karma Test Runner to integrate MSL (Mock Service Layer)

Installation

The easiest way is to keep karma-msl as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.12.0",
    "karma-msl": "~0.0.5"
  }
}

You can simply do it by:

npm install karma-msl --save-dev

Configuration

Integrating MSL with Jasmine tests (you can also integrate with your favorite testing framework)

// karma.conf.js
module.exports = function(config) {
  config.set({
    frameworks: ['jasmine, msl'],

    files: [
      'spec/*.js'
    ],
    
    // configuration for msl plugin
    msl: {
      port: '8002', //port to start msl server.  8000 by default.
      basedir: '../src/', // directory containing the app code (front-end code under test).  current dir by default.
      debug: 'true' // true to turn on debugging. false by default.
    },
    
    // this port should match the msl port specified in msl plugin config
    proxies: {
      '/' : 'http://localhost:8002/'
    },
    
    // this port should match the msl port used within the tests
    port: 8001,
  });
};

Contributing & Sponsor

More information on how to contribute to this project including sign off and the DCO agreement, please see the project's GitHub wiki.

FINRA has graciously allocated time for their internal development resources to enhance karma-msl and encourages participation in the open source community. Want to join FINRA? Please visit https://finra.org/careers.

FINRA Logo

License Type

MSL project, including karma-msl plugin, is licensed under Apache License Version 2.0

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.