react-fast-compare/test/node/basics.spec.js
Ryan Roemer 53a5ca111b
Chore/browser tests (#10)
- Refactor the test directory structure.
- Imports the `node` tests into the browser, building with webpack. They are the source of truth.
- Run headless chrome in Travis.
- Run IE9 in Appveyor.
- Use `builder` to parallelize running lint and various tests.
- Fixes #7
2018-04-13 14:29:01 -07:00

31 lines
625 B
JavaScript

'use strict';
var assert = require('assert');
var sinon = require('sinon');
var equal = require('../..');
var tests = require('./tests');
describe('basics', function() {
let sandbox;
beforeEach(() => {
sandbox = sinon.sandbox.create();
sandbox.stub(console, 'warn');
});
afterEach(() => {
sandbox.restore();
});
tests.all.forEach(function (suite) {
describe(suite.description, function() {
suite.tests.forEach(function (test) {
it(test.description, function() {
assert.strictEqual(equal(test.value1, test.value2), test.equal);
});
});
});
});
});