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.3 to 2.0.0-alpha.4

4

CHANGELOG.md

@@ -0,1 +1,5 @@

##### 2.0.0-alpha.4 - 16 February 2016
- Better configurability
##### 2.0.0-alpha.3 - 16 February 2016

@@ -2,0 +6,0 @@

2

package.json
{
"name": "js-data-adapter-tests",
"description": "Tests for js-data adapters.",
"version": "2.0.0-alpha.3",
"version": "2.0.0-alpha.4",
"homepage": "http://www.js-data.io",

@@ -6,0 +6,0 @@ "repository": {

@@ -34,52 +34,56 @@ /* global assert:true */

it('should filter users using the "in" operator', async function () {
var users = await adapter.findAll(User, {
where: {
age: {
'in': [30]
if (options.features === 'all' || options.features.indexOf('inOp') !== -1) {
it('should filter users using the "in" operator', async function () {
var users = await adapter.findAll(User, {
where: {
age: {
'in': [30]
}
}
}
})
assert.equal(users.length, 0)
})
assert.equal(users.length, 0)
var user = await adapter.create(User, {name: 'John'})
var id = user.id
var user = await adapter.create(User, {name: 'John'})
var id = user.id
var users2 = await adapter.findAll(User, { name: 'John' })
assert.equal(users2.length, 1)
assert.equal(users2[0].id, id)
assert.equal(users2[0].name, 'John')
var users2 = await adapter.findAll(User, { name: 'John' })
assert.equal(users2.length, 1)
assert.equal(users2[0].id, id)
assert.equal(users2[0].name, 'John')
var destroyedUser = await adapter.destroy(User, id)
assert.equal(destroyedUser, id)
})
var destroyedUser = await adapter.destroy(User, id)
assert.equal(destroyedUser, id)
})
}
it('should filter users using the "like" operator', async function () {
var users = await adapter.findAll(User, {
where: {
name: {
'like': '%J%'
if (options.features === 'all' || options.features.indexOf('likeOp') !== -1) {
it('should filter users using the "like" operator', async function () {
var users = await adapter.findAll(User, {
where: {
name: {
'like': '%J%'
}
}
}
})
assert.equal(users.length, 0)
})
assert.equal(users.length, 0)
var user = await adapter.create(User, {name: 'John'})
var id = user.id
var user = await adapter.create(User, {name: 'John'})
var id = user.id
var users2 = await adapter.findAll(User, {
where: {
name: {
'like': '%J%'
var users2 = await adapter.findAll(User, {
where: {
name: {
'like': '%J%'
}
}
}
})
assert.equal(users2.length, 1)
assert.equal(users2[0].id, id)
assert.equal(users2[0].name, 'John')
var destroyedUser = await adapter.destroy(User, id)
assert.equal(destroyedUser, id)
})
assert.equal(users2.length, 1)
assert.equal(users2[0].id, id)
assert.equal(users2[0].name, 'John')
}
var destroyedUser = await adapter.destroy(User, id)
assert.equal(destroyedUser, id)
})
if (options.features === 'all' || options.features.indexOf('filterOpNotFound') !== -1) {

@@ -86,0 +90,0 @@ it('should throw "Operator not found" error', async function () {

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