mirror of
https://github.com/FormidableLabs/react-fast-compare.git
synced 2026-01-18 16:13:59 +00:00
- 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
31 lines
625 B
JavaScript
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);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|