vendredi 30 décembre 2016

Testing reactjs components with mochajs

I'm trying to run a simple test with mochajs:

var assert = require('assert'),
    ActionCreators = require('../src/components/Dashboard/ActionCreators.js');

describe('', function () {
  it('', function () {
    assert.equal(1, 1);
  });
});

But it throws errors that the ActionCreators file contain import keywords. It does, becuase I run my code with webpack, and it goes through babel.

I've been trying to run this test with mocha-webpack, but it's the same. How should I do this?

Aucun commentaire:

Enregistrer un commentaire