Refactor and update to LowDB 0.4

This commit is contained in:
Typicode
2014-10-13 15:56:47 +02:00
parent 9c17780656
commit 6d88075ff2
13 changed files with 369 additions and 399 deletions

View File

@ -2,11 +2,11 @@ var assert = require('assert')
var utils = require('../src/utils')
describe('utils', function() {
describe('getRemovable', function() {
it('should return removable documents', function() {
var db = {
posts: [
{id: 1, comment: 1}
@ -20,8 +20,8 @@ describe('utils', function() {
}
var expected = [
['comments', 2],
['comments', 3]
{ name: 'comments', id: 2 },
{ name: 'comments', id: 3 }
]
assert.deepEqual(expected, utils.getRemovable(db))
@ -39,7 +39,7 @@ describe('utils', function() {
assert.strictEqual(utils.toNative('string'), 'string')
assert.strictEqual(utils.toNative(1), 1)
assert.strictEqual(utils.toNative(true), true)
})
})