tubalmartin / karma-chai-sinon Goto Github PK
View Code? Open in Web Editor NEWThis project forked from xdissent/karma-chai
Chai + Sinon-Chai + Sinon for Karma
License: MIT License
This project forked from xdissent/karma-chai
Chai + Sinon-Chai + Sinon for Karma
License: MIT License
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
Have you consider using
"peerDependencies": {
"chai": "*",
"sinon-chai": "*",
"sinon": "*"
"karma": "~0.10.9"
}
To let npm installation process to manage updates and cross-dependencies?
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
.
I want to use karma-chai-sinon and karma-chai-as-promised - https://github.com/vlkosinov/karma-chai-as-promised
But karma-chai-as-promised has a peer dependency on karma-chai and this has a dependency on chai which it includes itself.
It would be best if this only included the sinon and chai scripts and relied on using karma-chai. ?
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.