Socket
Socket
Sign inDemoInstall

@feathersjs/adapter-tests

Package Overview
Dependencies
Maintainers
4
Versions
97
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 5.0.0-pre.18 to 5.0.0-pre.19

17

CHANGELOG.md

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

# [5.0.0-pre.19](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.18...v5.0.0-pre.19) (2022-05-01)
### Bug Fixes
* **adapter-commons:** Clarify adapter query filtering ([#2607](https://github.com/feathersjs/feathers/issues/2607)) ([2dac771](https://github.com/feathersjs/feathers/commit/2dac771b0a3298d6dd25994d05186701b0617718))
* **adapter-tests:** Ensure multi tests can run standalone ([#2608](https://github.com/feathersjs/feathers/issues/2608)) ([d7243f2](https://github.com/feathersjs/feathers/commit/d7243f20e84d9dde428ad8dfc7f48388ca569e6e))
### BREAKING CHANGES
* **adapter-commons:** Changes the common adapter base class to use `sanitizeQuery` and `sanitizeData`
# [5.0.0-pre.18](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.17...v5.0.0-pre.18) (2022-04-11)

@@ -8,0 +25,0 @@

@@ -41,2 +41,20 @@ "use strict";

});
test('.$get', () => {
assert_1.default.strictEqual(typeof service.$get, 'function');
});
test('.$find', () => {
assert_1.default.strictEqual(typeof service.$find, 'function');
});
test('.$create', () => {
assert_1.default.strictEqual(typeof service.$create, 'function');
});
test('.$update', () => {
assert_1.default.strictEqual(typeof service.$update, 'function');
});
test('.$patch', () => {
assert_1.default.strictEqual(typeof service.$patch, 'function');
});
test('.$remove', () => {
assert_1.default.strictEqual(typeof service.$remove, 'function');
});
});

@@ -43,0 +61,0 @@ });

2

lib/declarations.d.ts

@@ -6,4 +6,4 @@ export declare type AdapterTest = (name: AdapterTestName, runner: any) => void;

export declare type AdapterTestName = AdapterBasicTestName | AdapterMethodsTestName | AdapterSyntaxTestName;
export declare type AdapterBasicTestName = '.id' | '.options' | '.events' | '._get' | '._find' | '._create' | '._update' | '._patch' | '._remove';
export declare type AdapterBasicTestName = '.id' | '.options' | '.events' | '._get' | '._find' | '._create' | '._update' | '._patch' | '._remove' | '.$get' | '.$find' | '.$create' | '.$update' | '.$patch' | '.$remove';
export declare type AdapterMethodsTestName = '.get' | '.get + $select' | '.get + id + query' | '.get + NotFound' | '.get + id + query id' | '.find' | '.remove' | '.remove + $select' | '.remove + id + query' | '.remove + multi' | '.remove + multi no pagination' | '.remove + id + query id' | '.update' | '.update + $select' | '.update + id + query' | '.update + NotFound' | '.update + query + NotFound' | '.update + id + query id' | '.patch' | '.patch + $select' | '.patch + id + query' | '.patch multiple' | '.patch multiple no pagination' | '.patch multi query same' | '.patch multi query changed' | '.patch + NotFound' | '.patch + query + NotFound' | '.patch + id + query id' | '.create' | '.create + $select' | '.create multi' | 'internal .find' | 'internal .get' | 'internal .create' | 'internal .update' | 'internal .patch' | 'internal .remove';
export declare type AdapterSyntaxTestName = '.find + equal' | '.find + equal multiple' | '.find + $sort' | '.find + $sort + string' | '.find + $limit' | '.find + $limit 0' | '.find + $skip' | '.find + $select' | '.find + $or' | '.find + $in' | '.find + $nin' | '.find + $lt' | '.find + $lte' | '.find + $gt' | '.find + $gte' | '.find + $ne' | '.find + $gt + $lt + $sort' | '.find + $or nested + $sort' | 'params.adapter + paginate' | 'params.adapter + multi' | '.find + paginate' | '.find + paginate + query' | '.find + paginate + $limit + $skip' | '.find + paginate + $limit 0' | '.find + paginate + params';

@@ -42,3 +42,2 @@ "use strict";

after(() => {
console.log('\n');
testNames.forEach(name => {

@@ -45,0 +44,0 @@ if (!allTests.includes(name)) {

@@ -355,2 +355,4 @@ "use strict";

const service = app.service(serviceName);
const multiBefore = service.options.multi;
service.options.multi = true;
const params = {

@@ -377,5 +379,8 @@ query: { age: { $lt: 10 } }

await service.remove(david[idProp]);
service.options.multi = multiBefore;
});
test('.patch multi query changed', async () => {
const service = app.service(serviceName);
const multiBefore = service.options.multi;
service.options.multi = true;
const params = {

@@ -402,2 +407,3 @@ query: { age: 10 }

await service.remove(david[idProp]);
service.options.multi = multiBefore;
});

@@ -404,0 +410,0 @@ test('.patch + NotFound', async () => {

{
"name": "@feathersjs/adapter-tests",
"version": "5.0.0-pre.18",
"version": "5.0.0-pre.19",
"description": "Feathers shared database adapter test suite",

@@ -52,10 +52,10 @@ "homepage": "https://feathersjs.com",

"devDependencies": {
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.23",
"mocha": "^9.2.2",
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.31",
"mocha": "^10.0.0",
"shx": "^0.3.4",
"ts-node": "^10.7.0",
"typescript": "^4.6.3"
"typescript": "^4.6.4"
},
"gitHead": "c0b7b67d872dcd6b6d94e4587f21332c8a519b50"
"gitHead": "57f3e18bb62735e1869ffafee90286498738fdfa"
}

@@ -52,4 +52,28 @@ import assert from 'assert';

});
test('.$get', () => {
assert.strictEqual(typeof service.$get, 'function');
});
test('.$find', () => {
assert.strictEqual(typeof service.$find, 'function');
});
test('.$create', () => {
assert.strictEqual(typeof service.$create, 'function');
});
test('.$update', () => {
assert.strictEqual(typeof service.$update, 'function');
});
test('.$patch', () => {
assert.strictEqual(typeof service.$patch, 'function');
});
test('.$remove', () => {
assert.strictEqual(typeof service.$remove, 'function');
});
});
});
};

@@ -18,3 +18,9 @@ export type AdapterTest = (name: AdapterTestName, runner: any) => void;

'._patch' |
'._remove';
'._remove'|
'.$get' |
'.$find' |
'.$create' |
'.$update' |
'.$patch' |
'.$remove';

@@ -21,0 +27,0 @@ export type AdapterMethodsTestName =

@@ -31,3 +31,2 @@ /* eslint-disable no-console */

after(() => {
console.log('\n');
testNames.forEach(name => {

@@ -34,0 +33,0 @@ if (!allTests.includes(name)) {

@@ -459,2 +459,6 @@ import assert from 'assert';

const service = app.service(serviceName);
const multiBefore = service.options.multi;
service.options.multi = true;
const params = {

@@ -484,2 +488,4 @@ query: { age: { $lt: 10 } }

await service.remove(david[idProp]);
service.options.multi = multiBefore;
});

@@ -489,2 +495,6 @@

const service = app.service(serviceName);
const multiBefore = service.options.multi;
service.options.multi = true;
const params = {

@@ -514,2 +524,4 @@ query: { age: 10 }

await service.remove(david[idProp]);
service.options.multi = multiBefore;
});

@@ -516,0 +528,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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