@feathersjs/adapter-tests 4.5.2 → 4.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,44 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.5.12](https://github.com/feathersjs/databases/compare/v4.5.11...v4.5.12) (2022-01-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Update all dependencies for crow release ([#2520](https://github.com/feathersjs/databases/issues/2520)) ([1c63e6b](https://github.com/feathersjs/databases/commit/1c63e6be37ff85edbe8dd318415ca6919864c033))
12
+
13
+
14
+
15
+
16
+
17
+ ## [4.5.11](https://github.com/feathersjs/databases/compare/v4.5.10...v4.5.11) (2020-12-05)
18
+
19
+ **Note:** Version bump only for package @feathersjs/adapter-tests
20
+
21
+
22
+
23
+
24
+
25
+ ## [4.5.4](https://github.com/feathersjs/databases/compare/@feathersjs/adapter-tests@4.5.3...@feathersjs/adapter-tests@4.5.4) (2020-09-27)
26
+
27
+ **Note:** Version bump only for package @feathersjs/adapter-tests
28
+
29
+
30
+
31
+
32
+
33
+ ## 4.5.3 (2020-09-24)
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * **adapter-tests:** Update multi patch + query tests ([#5](https://github.com/feathersjs/databases/issues/5)) ([84f1fe4](https://github.com/feathersjs/databases/commit/84f1fe4f13dc3a26891e43b965f75d08243f6c6f))
39
+
40
+
41
+
42
+
43
+
6
44
  ## [4.5.2](https://github.com/feathersjs/feathers/compare/v4.5.1...v4.5.2) (2020-03-04)
7
45
 
8
46
  **Note:** Version bump only for package @feathersjs/adapter-tests
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Feathers
3
+ Copyright (c) 2020 Feathers
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/lib/basic.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const _default: (test: any, app: any, _errors: any, serviceName: string, idProp: string) => void;
2
+ export default _default;
package/lib/basic.js CHANGED
@@ -1,53 +1,44 @@
1
- const assert = require('assert');
2
-
3
- module.exports = (test, app, errors, serviceName, idProp) => {
4
- describe('Basic Functionality', () => {
5
- let service;
6
-
7
- beforeEach(() => {
8
- service = app.service(serviceName);
9
- });
10
-
11
- it('.id', () => {
12
- assert.strictEqual(service.id, idProp,
13
- 'id property is set to expected name'
14
- );
15
- });
16
-
17
- test('.options', () => {
18
- assert.ok(service.options, 'Options are available in service.options');
19
- });
20
-
21
- test('.events', () => {
22
- assert.ok(service.events.includes('testing'),
23
- 'service.events is set and includes "testing"'
24
- );
25
- });
26
-
27
- describe('Raw Methods', () => {
28
- test('._get', () => {
29
- assert.strictEqual(typeof service._get, 'function');
30
- });
31
-
32
- test('._find', () => {
33
- assert.strictEqual(typeof service._find, 'function');
34
- });
35
-
36
- test('._create', () => {
37
- assert.strictEqual(typeof service._create, 'function');
38
- });
39
-
40
- test('._update', () => {
41
- assert.strictEqual(typeof service._update, 'function');
42
- });
43
-
44
- test('._patch', () => {
45
- assert.strictEqual(typeof service._patch, 'function');
46
- });
47
-
48
- test('._remove', () => {
49
- assert.strictEqual(typeof service._remove, 'function');
50
- });
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const assert_1 = __importDefault(require("assert"));
7
+ exports.default = (test, app, _errors, serviceName, idProp) => {
8
+ describe('Basic Functionality', () => {
9
+ let service;
10
+ beforeEach(() => {
11
+ service = app.service(serviceName);
12
+ });
13
+ it('.id', () => {
14
+ assert_1.default.strictEqual(service.id, idProp, 'id property is set to expected name');
15
+ });
16
+ test('.options', () => {
17
+ assert_1.default.ok(service.options, 'Options are available in service.options');
18
+ });
19
+ test('.events', () => {
20
+ assert_1.default.ok(service.events.includes('testing'), 'service.events is set and includes "testing"');
21
+ });
22
+ describe('Raw Methods', () => {
23
+ test('._get', () => {
24
+ assert_1.default.strictEqual(typeof service._get, 'function');
25
+ });
26
+ test('._find', () => {
27
+ assert_1.default.strictEqual(typeof service._find, 'function');
28
+ });
29
+ test('._create', () => {
30
+ assert_1.default.strictEqual(typeof service._create, 'function');
31
+ });
32
+ test('._update', () => {
33
+ assert_1.default.strictEqual(typeof service._update, 'function');
34
+ });
35
+ test('._patch', () => {
36
+ assert_1.default.strictEqual(typeof service._patch, 'function');
37
+ });
38
+ test('._remove', () => {
39
+ assert_1.default.strictEqual(typeof service._remove, 'function');
40
+ });
41
+ });
51
42
  });
52
- });
53
43
  };
44
+ //# sourceMappingURL=basic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic.js","sourceRoot":"","sources":["../src/basic.ts"],"names":[],"mappings":";;;;;AAAA,oDAA4B;AAE5B,kBAAe,CAAC,IAAS,EAAE,GAAQ,EAAE,OAAY,EAAE,WAAmB,EAAE,MAAc,EAAE,EAAE;IACxF,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;QACnC,IAAI,OAAY,CAAC;QAEjB,UAAU,CAAC,GAAG,EAAE;YACd,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;YACb,gBAAM,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EACnC,qCAAqC,CACtC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE;YACpB,gBAAM,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,0CAA0C,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,EAAE,GAAG,E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+ export default adapterTests;
package/lib/index.js CHANGED
@@ -1,47 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
1
6
  /* tslint:disable:no-console */
2
- const basicTests = require('./basic');
3
- const methodTests = require('./methods');
4
- const syntaxTests = require('./syntax');
5
-
6
- module.exports = testNames => {
7
- return (app, errors, serviceName, idProp = 'id') => {
8
- if (!serviceName) {
9
- throw new Error('You must pass a service name');
10
- }
11
-
12
- const skippedTests = [];
13
- const allTests = [];
14
-
15
- const test = (name, runner) => {
16
- const skip = !testNames.includes(name);
17
- const its = skip ? it.skip : it;
18
-
19
- if (skip) {
20
- skippedTests.push(name);
21
- }
22
-
23
- allTests.push(name);
24
-
25
- its(name, runner);
26
- };
27
-
28
- describe(`Adapter tests for '${serviceName}' service with '${idProp}' id property`, () => {
29
- after(() => {
30
- console.log('\n');
31
- testNames.forEach(name => {
32
- if (!allTests.includes(name)) {
33
- console.error(`WARNING: '${name}' test is not part of the test suite`);
34
- }
35
- });
36
- if (skippedTests.length) {
37
- console.log(`\nSkipped the following ${skippedTests.length} Feathers adapter test(s) out of ${allTests.length} total:`);
38
- console.log(JSON.stringify(skippedTests, null, ' '));
7
+ const basic_1 = __importDefault(require("./basic"));
8
+ const methods_1 = __importDefault(require("./methods"));
9
+ const syntax_1 = __importDefault(require("./syntax"));
10
+ const adapterTests = (testNames) => {
11
+ return (app, errors, serviceName, idProp = 'id') => {
12
+ if (!serviceName) {
13
+ throw new Error('You must pass a service name');
39
14
  }
40
- });
41
-
42
- basicTests(test, app, errors, serviceName, idProp);
43
- methodTests(test, app, errors, serviceName, idProp);
44
- syntaxTests(test, app, errors, serviceName, idProp);
45
- });
46
- };
15
+ const skippedTests = [];
16
+ const allTests = [];
17
+ const test = (name, runner) => {
18
+ const skip = !testNames.includes(name);
19
+ const its = skip ? it.skip : it;
20
+ if (skip) {
21
+ skippedTests.push(name);
22
+ }
23
+ allTests.push(name);
24
+ its(name, runner);
25
+ };
26
+ describe(`Adapter tests for '${serviceName}' service with '${idProp}' id property`, () => {
27
+ after(() => {
28
+ console.log('\n');
29
+ testNames.forEach(name => {
30
+ if (!allTests.includes(name)) {
31
+ console.error(`WARNING: '${name}' test is not part of the test suite`);
32
+ }
33
+ });
34
+ if (skippedTests.length) {
35
+ console.log(`\nSkipped the following ${skippedTests.length} Feathers adapter test(s) out of ${allTests.length} total:`);
36
+ console.log(JSON.stringify(skippedTests, null, ' '));
37
+ }
38
+ });
39
+ (0, basic_1.default)(test, app, errors, serviceName, idProp);
40
+ (0, methods_1.default)(test, app, errors, serviceName, idProp);
41
+ (0, syntax_1.default)(test, app, errors, serviceName, idProp);
42
+ });
43
+ };
47
44
  };
45
+ exports.default = adapterTests;
46
+ if (typeof module !== 'undefined') {
47
+ module.exports = adapterTests;
48
+ }
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,+BAA+B;AAC/B,oDAAiC;AACjC,wDAAoC;AACpC,sDAAmC;AAEnC,MAAM,YAAY,GAAG,CAAC,SAAmB,EAAE,EAAE;IAC3C,OAAO,CAAC,GAAQ,EAAE,MAAW,EAAE,WAAgB,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE;QAChE,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QAED,MAAM,YAAY,GAAa,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAa,EAAE,CAAC;QAE9B,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,MAAW,EAAE,EAAE;YACzC,MAAM,IAAI,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACvC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,C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