Git Product home page Git Product logo

karma-chai-sinon's Introduction

karma-chai-sinon

Chai + Sinon-Chai + Sinon for Karma

What makes this plugin different from karma-sinon-chai?

  • It allows you to use either the latest versions of sinon, chai and sinon-chai or the specific versions your project already uses.
  • It uses peerDependencies only.
  • No bower dependency.

NPM

Installation

Install the plugin from npm:

$ npm install karma-chai-sinon --save-dev

Install the plugin from Github:

$ npm install 'git://github.com/tubalmartin/karma-chai-sinon.git' --save-dev

Add chai-sinon to the frameworks key in your Karma configuration:

module.exports = function(config) {
  config.set({

    // frameworks to use
    frameworks: ['mocha', 'chai-sinon']

    // ...

License

The MIT License (MIT)

karma-chai-sinon's People

Contributors

alexgorbatchev avatar princed avatar tubalmartin avatar xdissent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

karma-chai-sinon's Issues

Doesn't work with requirejs plugin

In karma.conf.js we have frameworks: ['mocha', 'chai-sinon', 'requirejs']. And we get 2 errors:

Uncaught TypeError: Cannot read property 'should' of undefined
require.js:140 Uncaught Error: Mismatched anonymous define() module: function (){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
module.exports = require('./lib/chai');

},{"./lib/chai":2}],2:[function(require,module,exports){
/*!
 * chai
 * Copyright(c) 2011-2014 Jake Luer <[email protected]>
 * MIT Licensed
 */
... <chai.js source code continues> ...

}
http://requirejs.org/docs/errors.html#mismatch

peerDependencies maintanibility

Have you consider using

"peerDependencies": {
   "chai": "*",
   "sinon-chai": "*",
   "sinon": "*"
   "karma": "~0.10.9"
}

To let npm installation process to manage updates and cross-dependencies?

Cannot find provider.

I have the framework in my karma.conf.js as mentioned, but I'm getting this error:

Error: No provider for "framework:chai-sinon"! (Resolving: framework:chai-sinon)

Maximum call stack size exceeded in PhantomJS

I've submitted a PR to karma-chai here: xdissent#13 but there hasn't been activity on that repo in a long time, and a couple other PRs have been sitting around for >6 months.

I wonder if you might be willing to fold that change into your repo? It's a simple tweak to adapter.js.

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.