Skip to content

Instantly share code, notes, and snippets.

@dustingetz
Created July 10, 2014 02:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustingetz/240ffacda5edf5802a00 to your computer and use it in GitHub Desktop.
Save dustingetz/240ffacda5edf5802a00 to your computer and use it in GitHub Desktop.
// In lieu of unit tests:
var c1 = window.c1 = Cursor.build(window.App);
var c2 = window.c2 = Cursor.build(window.App);
console.assert(c1.value === c2.value);
console.assert(c1.onChange === c2.onChange);
console.assert(c1 === c2);
var c10 = c1.refine('very', 'deeply', 'nested', 'counts', '0');
var c20 = c2.refine('very', 'deeply', 'nested', 'counts', '0');
console.assert(c10.value === c20.value);
console.assert(c10.onChange === c20.onChange);
console.assert(c10 === c20);
var c20b = c2.refine('very', 'deeply', 'nested', 'counts', '0');
console.assert(c20b.value === c20.value);
console.assert(c20b.onChange === c20.onChange);
console.assert(c20b === c20);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment