rethinkdbdash
Advanced tools
Comparing version 1.12.3 to 1.12.4
{ | ||
"name": "rethinkdbdash", | ||
"version": "1.12.3", | ||
"version": "1.12.4", | ||
"description": "A Node.js driver for RethinkDB with promises and a connection pool", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -162,4 +162,14 @@ var config = require(__dirname+'/config.js'); | ||
}) | ||
It("`insert` work with dates", function* (done) { | ||
It("`insert` work with dates - 1", function* (done) { | ||
try { | ||
result = yield r.db(dbName).table(tableName).insert({name: "Michel", age: 27, birthdate: new Date()}).run() | ||
assert.deepEqual(result.inserted, 1); | ||
done(); | ||
} | ||
catch(e) { | ||
done(e); | ||
} | ||
}) | ||
It("`insert` work with dates - 2", function* (done) { | ||
try { | ||
result = yield r.db(dbName).table(tableName).insert([{name: "Michel", age: 27, birthdate: new Date()}, {name: "Sophie", age: 23}]).run() | ||
@@ -173,2 +183,30 @@ assert.deepEqual(result.inserted, 2); | ||
}) | ||
It("`insert` work with dates - 3", function* (done) { | ||
try { | ||
result = yield r.db(dbName).table(tableName).insert({ | ||
field: 'test', | ||
field2: { nested: 'test' }, | ||
date: new Date() | ||
}).run() | ||
assert.deepEqual(result.inserted, 1); | ||
done(); | ||
} | ||
catch(e) { | ||
done(e); | ||
} | ||
}) | ||
It("`insert` work with dates - 4", function* (done) { | ||
try { | ||
result = yield r.db(dbName).table(tableName).insert({ | ||
field: 'test', | ||
field2: { nested: 'test' }, | ||
date: r.now() | ||
}).run() | ||
assert.deepEqual(result.inserted, 1); | ||
done(); | ||
} | ||
catch(e) { | ||
done(e); | ||
} | ||
}) | ||
@@ -175,0 +213,0 @@ It("`insert` should throw if non valid option", function* (done) { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
437375
13132