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

js-data-adapter-tests

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-data-adapter-tests - npm Package Compare versions

Comparing version 2.0.0-alpha.9 to 2.0.0-alpha.10

8

CHANGELOG.md

@@ -0,1 +1,9 @@

##### 2.0.0-alpha.10 - 26 February 2016
- Some fixes
##### 2.0.0-alpha.9 - 26 February 2016
- Some fixes
##### 2.0.0-alpha.8 - 26 February 2016

@@ -2,0 +10,0 @@

2

package.json

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/js-data/js-data-adapter-tests",
"version": "2.0.0-alpha.9",
"version": "2.0.0-alpha.10",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -18,4 +18,4 @@ /* global assert:true */

})
assert.isDefined(users[0].id)
assert.isDefined(users[1].id)
assert.isDefined(users[0][User.idAttribute])
assert.isDefined(users[1][User.idAttribute])
assert.equal(users.filter(function (x) { return x.age === 20 }).length, 1)

@@ -22,0 +22,0 @@ assert.equal(users.filter(function (x) { return x.age === 30 }).length, 1)

@@ -21,4 +21,4 @@ /* global assert:true */

assert.debug('findAll', User.name, props)
let foundUsers = await adapter.findAll(User, props)
assert.debug('findAll', User.name, { name: 'John' })
let foundUsers = await adapter.findAll(User, { name: 'John' })
assert.debug('found', User.name, foundUsers)

@@ -29,9 +29,9 @@ assert.equal(foundUsers.length, 1, 'foundUsers.length')

assert.debug('destroyAll', User.name, props)
const destroyedUsers = await adapter.destroyAll(User, props)
assert.debug('destroyAll', User.name, { name: 'John' })
const destroyedUsers = await adapter.destroyAll(User, { name: 'John' })
assert.debug('destroyed', User.name, destroyedUsers)
assert.isUndefined(destroyedUsers, 'destroyedUsers')
assert.debug('findAll', User.name, props)
foundUsers = await adapter.findAll(User, props)
assert.debug('findAll', User.name, { name: 'John' })
foundUsers = await adapter.findAll(User, { name: 'John' })
assert.debug('found', User.name, foundUsers)

@@ -38,0 +38,0 @@ assert.equal(foundUsers.length, 0)

@@ -44,3 +44,3 @@ /* global assert:true */

// Test re-assignment
return Promise.resolve({ [User.idAttribute]: user[User.idAttribute], name: 'bar' })
return Promise.resolve({ name: 'bar' })
}

@@ -76,5 +76,5 @@ adapter.afterUpdate = function (mapper, id, props, opts, record) {

assert.debug('create', props)
assert.debug('create', User.name, props)
const user = await adapter.create(User, props)
assert.debug('created', JSON.stringify(user, null, 2))
assert.debug('created', User.name, user)

@@ -84,5 +84,5 @@ assert.equal(user.name, props.name, `name of user should be "${props.name}"`)

assert.debug('update', user[User.idAttribute], { name: 'Johnny' })
assert.debug('update', User.name, user[User.idAttribute], { name: 'Johnny' })
const result = await adapter.update(User, user[User.idAttribute], { name: 'Johnny' }, { raw: true })
assert.debug('updated', JSON.stringify(result, null, 2))
assert.debug('updated', User.name, result)
assert.isDefined(result.data, 'result.data is defined')

@@ -89,0 +89,0 @@ assert.isDefined(result.updated, 'result.updated is defined')

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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