1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-14 19:42:49 +00:00

Added files

This commit is contained in:
2015-06-25 16:28:41 -05:00
parent 656dca9289
commit eb27b55a54
5621 changed files with 1630154 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
{expect, calls} = require 'racer/test/util'
app = require '../lib/app'
describe 'App', ->
it 'merges a tree into an empty object', ->
root = {}
fn = ->
tree =
x:
a: 23
b: fn
y: 12
app.treeMerge root, tree
expect(root).not.equal tree
expect(root).eql tree
it 'merges a tree into a non-empty object', ->
fn2 = ->
root =
x:
c: fn2
d:
n: 2
z: 23
fn = ->
tree =
x:
a: 7
b: fn
y: 12
expected =
x:
a: 7
b: fn
c: fn2
d:
n: 2
y: 12
z: 23
app.treeMerge root, tree
expect(root).not.equal expected
expect(root).eql expected