Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rethinkdb-fixtures

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rethinkdb-fixtures - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

9

lib/insert.js

@@ -23,3 +23,10 @@ 'use strict';

resolve(result[0]);
const pack = {};
result.forEach( (object) => {
const key = Object.keys(object)[0];
pack[key] = object[key];
});
resolve(pack);
prep.close();

@@ -26,0 +33,0 @@ },reject);

2

package.json
{
"name": "rethinkdb-fixtures",
"version": "0.0.1",
"version": "0.0.2",
"description": "Easily load fixtures into Rethinkdb. Useful for testing.",

@@ -5,0 +5,0 @@ "main": "index.js",

'use strict';
const Insert = require('../index').Insert;
const _ = require('lodash');
const Lab = require('lab');

@@ -23,2 +22,7 @@ const Code = require('code');

}
],
artists: [
{
name: 'Crazy Ass Wicked Wild'
}
]

@@ -31,9 +35,10 @@ };

Insert(options, fixture).then( (result) => {
Insert(options, fixture).then( (objects) => {
const names = result.items.map( (item) => {
const idx = objects.items.findIndex( (item) => {
return item.name;
return item.name === 'Item 1';
});
expect(_.includes(names, 'Item 1')).to.be.equal(true);
expect(objects.items[idx].name).to.be.equal(fixture.items[0].name);
expect(objects.artists[0].name).to.be.equal(fixture.artists[0].name);
done();

@@ -40,0 +45,0 @@ }, console.error);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc