js-data-adapter-tests
Advanced tools
Comparing version 2.0.0-alpha.3 to 2.0.0-alpha.4
@@ -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 @@ |
{ | ||
"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
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
1025747
13910