Coder Social home page Coder Social logo

chai-jest-diff's People

Contributors

tdd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

nevir mlabrum eeroan

chai-jest-diff's Issues

incorrect usage example in README

The current usage example in github and npm, for the latest version v1.0.2, is:

const chai = require('chai')
const chaiJestDiff = require('chai-jest-diff')

chai.use(chaiJestDiff())

This code does not work and it throws:

  ● Test suite failed to run

    TypeError: _get__(...) is not a function

      3 | const chaiJestDiff = require('chai-jest-diff');
      4 |
    > 5 | chai.use(chaiJestDiff());
        |          ^
      6 | const { expect } = chai;

When using es module import in my code, this works:

import chai from 'chai';
import chaiJestDiff from 'chai-jest-diff';

const { expect } = chai;

chai.use(chaiJestDiff());

However, when using require like in the example in the readme, I need to do this:

const chai = require('chai');
const chaiJestDiff = require('chai-jest-diff');

chai.use(chaiJestDiff.default());
const { expect } = chai;

If nothing else, can the README please be updated so that others know how to use this module?

Update Jest peer dependency version

Love this package - have been looking for this! Makes chai + jest much much better.

Currently the peer dependency is set to ^20.0.4 which therefore errors if you run the latest version of jest 21.2.1. Please can you update the peer dependency to remove this warning.

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.