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

@feathersjs/adapter-tests

Package Overview
Dependencies
Maintainers
4
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feathersjs/adapter-tests - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [1.0.1](https://github.com/feathersjs/feathers/compare/@feathersjs/adapter-tests@1.0.0...@feathersjs/adapter-tests@1.0.1) (2019-01-10)
### Bug Fixes
* Add test to make sure different id in adapter query works ([#1165](https://github.com/feathersjs/feathers/issues/1165)) ([0ba4580](https://github.com/feathersjs/feathers/commit/0ba4580))
# 1.0.0 (2019-01-10)

@@ -8,0 +19,0 @@

119

lib/methods.js

@@ -55,11 +55,11 @@ const assert = require('assert');

}
});
test('.get + NotFound', async () => {
try {
await service.get(doug[idProp], {
query: { [idProp]: '568225fbfe21222432e836ff' }
});
await service.get('568225fbfe21222432e836ff');
throw new Error('Should never get here');
} catch (error) {
assert.ok(error instanceof errors.NotFound,
'Got a NotFound Feathers error'
'Error is a NotFound Feathers error'
);

@@ -69,11 +69,20 @@ }

test('.get + NotFound', async () => {
test('.get + id + query id', async () => {
const alice = await service.create({
name: 'Alice',
age: 12
});
try {
await service.get('568225fbfe21222432e836ff');
await service.get(doug[idProp], {
query: { [idProp]: alice[idProp] }
});
throw new Error('Should never get here');
} catch (error) {
assert.ok(error instanceof errors.NotFound,
'Error is a NotFound Feathers error'
'Got a NotFound Feathers error'
);
}
await service.remove(alice[idProp]);
});

@@ -118,13 +127,2 @@ });

}
try {
await service.remove(doug[idProp], {
query: { [idProp]: '568225fbfe21222432e836ff' }
});
throw new Error('Should never get here');
} catch (error) {
assert.ok(error instanceof errors.NotFound,
'Got a NotFound Feathers error'
);
}
});

@@ -162,2 +160,22 @@

});
test('.remove + id + query id', async () => {
const alice = await service.create({
name: 'Alice',
age: 12
});
try {
await service.remove(doug[idProp], {
query: { [idProp]: alice[idProp] }
});
throw new Error('Should never get here');
} catch (error) {
assert.ok(error instanceof errors.NotFound,
'Got a NotFound Feathers error'
);
}
await service.remove(alice[idProp]);
});
});

@@ -210,8 +228,25 @@

}
});
test('.update + NotFound', async () => {
try {
await service.update('568225fbfe21222432e836ff', { name: 'NotFound' });
throw new Error('Should never get here');
} catch (error) {
assert.ok(error instanceof errors.NotFound, 'Error is a NotFound Feathers error');
}
});
test('.update + id + query id', async () => {
const alice = await service.create({
name: 'Alice',
age: 12
});
try {
await service.update(doug[idProp], {
name: 'Dougler'
name: 'Dougler',
age: 33
}, {
query: { [idProp]: '568225fbfe21222432e836ff' }
query: { [idProp]: alice[idProp] }
});

@@ -224,11 +259,4 @@ throw new Error('Should never get here');

}
});
test('.update + NotFound', async () => {
try {
await service.update('568225fbfe21222432e836ff', { name: 'NotFound' });
throw new Error('Should never get here');
} catch (error) {
assert.ok(error instanceof errors.NotFound, 'Error is a NotFound Feathers error');
}
await service.remove(alice[idProp]);
});

@@ -278,15 +306,2 @@ });

}
try {
await service.patch(doug[idProp], {
name: 'id patched doug'
}, {
query: { [idProp]: '568225fbfe21222432e836ff' }
});
throw new Error('Should never get here');
} catch (error) {
assert.ok(error instanceof errors.NotFound,
'Got a NotFound Feathers error'
);
}
});

@@ -370,2 +385,24 @@

});
test('.patch + id + query id', async () => {
const alice = await service.create({
name: 'Alice',
age: 12
});
try {
await service.patch(doug[idProp], {
age: 33
}, {
query: { [idProp]: alice[idProp] }
});
throw new Error('Should never get here');
} catch (error) {
assert.ok(error instanceof errors.NotFound,
'Got a NotFound Feathers error'
);
}
await service.remove(alice[idProp]);
});
});

@@ -372,0 +409,0 @@

{
"name": "@feathersjs/adapter-tests",
"version": "1.0.0",
"version": "1.0.1",
"description": "Feathers shared database adapter test suite",

@@ -42,3 +42,3 @@ "homepage": "https://feathersjs.com",

},
"gitHead": "c3ae9d72e9433af992427eb2fc968435706b7985"
"gitHead": "dea0a32cca9dbeab90bd9cf0d2e975cec02c25d2"
}
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