@feathersjs/adapter-tests
Advanced tools
Comparing version 5.0.25 to 5.0.26
@@ -6,2 +6,6 @@ # Change Log | ||
## [5.0.26](https://github.com/feathersjs/feathers/compare/v5.0.25...v5.0.26) (2024-06-09) | ||
**Note:** Version bump only for package @feathersjs/adapter-tests | ||
## [5.0.25](https://github.com/feathersjs/feathers/compare/v5.0.24...v5.0.25) (2024-05-03) | ||
@@ -8,0 +12,0 @@ |
@@ -7,3 +7,3 @@ export type AdapterTest = (name: AdapterTestName, runner: any) => void; | ||
export type AdapterBasicTestName = '.id' | '.options' | '.events' | '._get' | '._find' | '._create' | '._update' | '._patch' | '._remove' | '.$get' | '.$find' | '.$create' | '.$update' | '.$patch' | '.$remove'; | ||
export 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' | '.create ignores query' | 'internal .find' | 'internal .get' | 'internal .create' | 'internal .update' | 'internal .patch' | 'internal .remove'; | ||
export type AdapterMethodsTestName = '.get' | '.get + $select' | '.get + id + query' | '.get + NotFound' | '.get + NotFound (integer)' | '.get + id + query id' | '.find' | '.remove' | '.remove + $select' | '.remove + id + query' | '.remove + NotFound' | '.remove + NotFound (integer)' | '.remove + multi' | '.remove + multi no pagination' | '.remove + id + query id' | '.update' | '.update + $select' | '.update + id + query' | '.update + NotFound' | '.update + NotFound (integer)' | '.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 + NotFound (integer)' | '.patch + query + NotFound' | '.patch + id + query id' | '.create' | '.create + $select' | '.create multi' | '.create ignores query' | 'internal .find' | 'internal .get' | 'internal .create' | 'internal .update' | 'internal .patch' | 'internal .remove'; | ||
export 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' | '.find + $and' | '.find + $and + $or' | 'params.adapter + paginate' | 'params.adapter + multi' | '.find + paginate' | '.find + paginate + query' | '.find + paginate + $limit + $skip' | '.find + paginate + $limit 0' | '.find + paginate + params'; |
@@ -59,2 +59,11 @@ "use strict"; | ||
}); | ||
test('.get + NotFound (integer)', async () => { | ||
try { | ||
await service.get(123456789); | ||
throw new Error('Should never get here'); | ||
} | ||
catch (error) { | ||
assert_1.default.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error'); | ||
} | ||
}); | ||
test('.get + id + query id', async () => { | ||
@@ -108,2 +117,20 @@ const alice = await service.create({ | ||
}); | ||
test('.remove + NotFound', async () => { | ||
try { | ||
await service.remove('568225fbfe21222432e836ff'); | ||
throw new Error('Should never get here'); | ||
} | ||
catch (error) { | ||
assert_1.default.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error'); | ||
} | ||
}); | ||
test('.remove + NotFound (integer)', async () => { | ||
try { | ||
await service.remove(123456789); | ||
throw new Error('Should never get here'); | ||
} | ||
catch (error) { | ||
assert_1.default.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error'); | ||
} | ||
}); | ||
test('.remove + multi', async () => { | ||
@@ -238,2 +265,13 @@ try { | ||
}); | ||
test('.update + NotFound (integer)', async () => { | ||
try { | ||
await service.update(123456789, { | ||
name: 'NotFound' | ||
}); | ||
throw new Error('Should never get here'); | ||
} | ||
catch (error) { | ||
assert_1.default.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error'); | ||
} | ||
}); | ||
test('.update + query + NotFound', async () => { | ||
@@ -439,2 +477,13 @@ const dave = await service.create({ name: 'Dave' }); | ||
}); | ||
test('.patch + NotFound (integer)', async () => { | ||
try { | ||
await service.patch(123456789, { | ||
name: 'PatchDoug' | ||
}); | ||
throw new Error('Should never get here'); | ||
} | ||
catch (error) { | ||
assert_1.default.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error'); | ||
} | ||
}); | ||
test('.patch + query + NotFound', async () => { | ||
@@ -441,0 +490,0 @@ const dave = await service.create({ name: 'Dave' }); |
{ | ||
"name": "@feathersjs/adapter-tests", | ||
"version": "5.0.25", | ||
"version": "5.0.26", | ||
"description": "Feathers shared database adapter test suite", | ||
@@ -60,3 +60,3 @@ "homepage": "https://feathersjs.com", | ||
}, | ||
"gitHead": "01bc3339efd27df1b3e8d4f6a82152faf6c5ced3" | ||
"gitHead": "3fe6843c1a478a2887ca91b6f79eda3b61d35ef3" | ||
} |
@@ -31,2 +31,3 @@ export type AdapterTest = (name: AdapterTestName, runner: any) => void | ||
| '.get + NotFound' | ||
| '.get + NotFound (integer)' | ||
| '.get + id + query id' | ||
@@ -37,2 +38,4 @@ | '.find' | ||
| '.remove + id + query' | ||
| '.remove + NotFound' | ||
| '.remove + NotFound (integer)' | ||
| '.remove + multi' | ||
@@ -45,2 +48,3 @@ | '.remove + multi no pagination' | ||
| '.update + NotFound' | ||
| '.update + NotFound (integer)' | ||
| '.update + query + NotFound' | ||
@@ -56,2 +60,3 @@ | '.update + id + query id' | ||
| '.patch + NotFound' | ||
| '.patch + NotFound (integer)' | ||
| '.patch + query + NotFound' | ||
@@ -58,0 +63,0 @@ | '.patch + id + query id' |
@@ -62,2 +62,11 @@ import assert from 'assert' | ||
test('.get + NotFound (integer)', async () => { | ||
try { | ||
await service.get(123456789) | ||
throw new Error('Should never get here') | ||
} catch (error: any) { | ||
assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') | ||
} | ||
}) | ||
test('.get + id + query id', async () => { | ||
@@ -119,2 +128,20 @@ const alice = await service.create({ | ||
test('.remove + NotFound', async () => { | ||
try { | ||
await service.remove('568225fbfe21222432e836ff') | ||
throw new Error('Should never get here') | ||
} catch (error: any) { | ||
assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') | ||
} | ||
}) | ||
test('.remove + NotFound (integer)', async () => { | ||
try { | ||
await service.remove(123456789) | ||
throw new Error('Should never get here') | ||
} catch (error: any) { | ||
assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') | ||
} | ||
}) | ||
test('.remove + multi', async () => { | ||
@@ -283,2 +310,13 @@ try { | ||
test('.update + NotFound (integer)', async () => { | ||
try { | ||
await service.update(123456789, { | ||
name: 'NotFound' | ||
}) | ||
throw new Error('Should never get here') | ||
} catch (error: any) { | ||
assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') | ||
} | ||
}) | ||
test('.update + query + NotFound', async () => { | ||
@@ -547,2 +585,13 @@ const dave = await service.create({ name: 'Dave' }) | ||
test('.patch + NotFound (integer)', async () => { | ||
try { | ||
await service.patch(123456789, { | ||
name: 'PatchDoug' | ||
}) | ||
throw new Error('Should never get here') | ||
} catch (error: any) { | ||
assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') | ||
} | ||
}) | ||
test('.patch + query + NotFound', async () => { | ||
@@ -549,0 +598,0 @@ const dave = await service.create({ name: 'Dave' }) |
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
157676
2296