mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-14 19:42:49 +00:00
Added files
This commit is contained in:
45
mongoui/mongoui-master/node_modules/derby/test/app.mocha.coffee
generated
vendored
Normal file
45
mongoui/mongoui-master/node_modules/derby/test/app.mocha.coffee
generated
vendored
Normal 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
|
||||
Reference in New Issue
Block a user