This commit is contained in:
Typicode
2015-06-16 01:45:25 +02:00
parent c3e092ca96
commit cd710213e0
8 changed files with 155 additions and 107 deletions

View File

@ -5,32 +5,6 @@ var utils = require('../src/utils')
describe('utils', function () {
describe('getRemovable', function () {
it('should return removable documents', function () {
var db = {
posts: [
{id: 1, comment: 1}
],
comments: [
{id: 1, postId: 1},
// Comments below references a post that doesn't exist
{id: 2, postId: 2},
{id: 3, postId: 2}
]
}
var expected = [
{name: 'comments', id: 2},
{name: 'comments', id: 3}
]
assert.deepEqual(utils.getRemovable(db), expected)
})
})
describe('toNative', function () {
it('should convert string to native type', function () {