Giter VIP home page Giter VIP logo

chai-change's People

Contributors

talyssonoc avatar timruffles avatar vfonic avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chai-change's Issues

Incompatible with chai 3.4.0?

var x = 0;

expect(function() { x += 1; }).to.change(function() { return x });
expect(function() {     }).not.to.change(function() { return x });

error:

AssertionError: expected [Function] to have a property undefined
at Assertion.assertChanges (node_modules/chai/lib/chai/core/assertions.js:1604:40)
at Assertion.assert (node_modules/chai/lib/chai/utils/addChainableMethod.js:83:49)

undefined is not a function

Undefined is not a function

Chrome 33.0.1750 (Mac OS X 10.9.2) ERROR
Uncaught TypeError: undefined is not a function
  at /Users/derp/Sites/derpaderp/public/lib/chai.js:765

Context: AMD environment (requirejs)

//main.js:
requirejs.config({
  paths: {
     'chai' : 'chai'
  ,  'chai_change': 'chai-change'
  }
, shim: {
  ,  'chai_change' : ['chai']
  }
});
//file.js
define([
  'chai'
, 'chai_change'
], function(chai){

  //I know this should work because I'm also using chai-things, sinon-chai and chai-jq and they work fine.
  chai.use(require('chai_change'));
});

How to use chai-change with ES6 import syntax?

Hi,

I'm new to ES6 dev and I don't know how to properly import chai-change to work together with chai.

Any ideas?

I can help adding this to Readme, as soon as I figure out how to do it myself. :)

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.