mirror of
https://github.com/SamEyeBam/animate.git
synced 2025-09-29 07:25:25 +00:00
larry babby and threejs for glsl
This commit is contained in:
33
webGl/my-threejs-test/node_modules/@parcel/utils/test/objectHash.test.js
generated
vendored
Normal file
33
webGl/my-threejs-test/node_modules/@parcel/utils/test/objectHash.test.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// @flow
|
||||
import assert from 'assert';
|
||||
import objectHash from '../src/objectHash';
|
||||
|
||||
describe('objectHash', () => {
|
||||
it('calculates the same hash for two different but deep equal objects', () => {
|
||||
const obj1 = {
|
||||
foo: {foo: 'foo', baz: ['foo', 'baz', 'bar'], bar: 'bar'},
|
||||
baz: 'baz',
|
||||
bar: 'bar',
|
||||
};
|
||||
const obj2 = {
|
||||
foo: {foo: 'foo', baz: ['foo', 'baz', 'bar'], bar: 'bar'},
|
||||
baz: 'baz',
|
||||
bar: 'bar',
|
||||
};
|
||||
|
||||
assert.equal(objectHash(obj1), objectHash(obj2));
|
||||
});
|
||||
|
||||
it('calculates a unique hash for two deep equal objects', () => {
|
||||
const obj1 = {
|
||||
baz: 'baz',
|
||||
bar: 'ba',
|
||||
};
|
||||
const obj2 = {
|
||||
baz: 'baz',
|
||||
bar: 'bar',
|
||||
};
|
||||
|
||||
assert.notEqual(objectHash(obj1), objectHash(obj2));
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user