I`m trying to write some tests for my react app.
I get this in console, when the tests are right.
0 passing (0ms)
Test file appTest.test.js
var expect = require('chai').expect
, foo = 'bar'
, beverages = { tea: [ 'chai', 'matcha', 'oolong' ] };
expect(foo).to.be.a('string');
expect(foo).to.equal('bar');
expect(foo).to.have.lengthOf(3);
expect(beverages).to.have.property('tea').with.lengthOf(3);
package.json
"test": "NODE_ENV=test mocha --require @babel/register --require ./test/*.test.js --watch",
What is interesting, that if I put the wrong expectation it fails so it receives the file
Aucun commentaire:
Enregistrer un commentaire