forked from enviPath/enviPy
Current Dev State
This commit is contained in:
50
static/js/ketcher2/node_modules/neatequal/tests/index.mocha.js
generated
vendored
Normal file
50
static/js/ketcher2/node_modules/neatequal/tests/index.mocha.js
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
var assert = require('assert');
|
||||
var neatEqual = require('../src/index');
|
||||
|
||||
describe('neatEqual', function () {
|
||||
|
||||
describe('should not throw', function () {
|
||||
|
||||
it('for simple equal objects', function() {
|
||||
assert.doesNotThrow(function() {
|
||||
neatEqual({test: 'test'}, {test: 'test'});
|
||||
});
|
||||
});
|
||||
|
||||
it('for simple equal arrays', function() {
|
||||
assert.doesNotThrow(function() {
|
||||
neatEqual(['test', 'test2'], ['test', 'test2']);
|
||||
});
|
||||
});
|
||||
|
||||
it('for deep equal objects', function() {
|
||||
assert.doesNotThrow(function() {
|
||||
neatEqual({test: 'test', test2: {test: 'test'}}, {test: 'test', test2: {test: 'test'}});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('should throw', function () {
|
||||
|
||||
it('for simple not equal objects', function() {
|
||||
assert.throws(function() {
|
||||
neatEqual({test: 'test'}, {test: 'test1'});
|
||||
});
|
||||
}, /AssertionError/);
|
||||
|
||||
it('for simple equal arrays', function() {
|
||||
assert.throws(function() {
|
||||
neatEqual(['test', 'test2'], ['test', 'test3']);
|
||||
});
|
||||
}, /AssertionError/);
|
||||
|
||||
it('for deep equal objects', function() {
|
||||
assert.throws(function() {
|
||||
neatEqual({test: 'test', test2: {test: 'test2'}}, {test: 'test', test2: {test: 'test'}});
|
||||
});
|
||||
}, /AssertionError/);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user