@axinom/mosaic-testing 0.1.0 → 0.1.1

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.
@@ -1,4 +1,3 @@
1
1
  export * from './colorize-text';
2
2
  export * from './report-generation';
3
- export * from './stub-helpers';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/performance/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/performance/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
@@ -16,5 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./colorize-text"), exports);
18
18
  __exportStar(require("./report-generation"), exports);
19
- __exportStar(require("./stub-helpers"), exports);
20
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/performance/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,sDAAoC;AACpC,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/performance/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,sDAAoC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axinom/mosaic-testing",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "This library encapsulates testing-related functionality for Mosaic based services.",
5
5
  "author": "Axinom",
6
6
  "license": "PROPRIETARY",
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "c0f92bb3b7f70813ad2dd1e36c2277a3372e1810"
58
+ "gitHead": "d739a77b5b15ba695ec3613450092b13e11b6e29"
59
59
  }
@@ -1,7 +1,7 @@
1
1
  import { removeAnsiColorEscapeCodes } from '@axinom/mosaic-service-common';
2
2
  import { GraphQLResolveInfo } from 'graphql';
3
3
  import 'jest-extended';
4
- import { getGraphQLResolveInfoStub, getPoolStub } from '../utils';
4
+ import { getGraphQLResolveInfoStub, getPoolStub } from '../../tests/utils';
5
5
  import { getInboxOutboxReportFunction } from './inbox-outbox-report-endpoint-plugin';
6
6
 
7
7
  const row = ({
@@ -1,6 +1,6 @@
1
1
  import { GraphQLResolveInfo } from 'graphql';
2
2
  import 'jest-extended';
3
- import { getGraphQLResolveInfoStub, getPoolStub } from '../utils';
3
+ import { getGraphQLResolveInfoStub, getPoolStub } from '../../tests/utils';
4
4
  import { getInboxOutboxStateFunction } from './inbox-outbox-state-endpoint-plugin';
5
5
 
6
6
  describe('InboxOutboxStateEndpointPlugin', () => {
@@ -1,3 +1,2 @@
1
1
  export * from './colorize-text';
2
2
  export * from './report-generation';
3
- export * from './stub-helpers';
@@ -0,0 +1 @@
1
+ export * from './stub-helpers';
@@ -1,12 +0,0 @@
1
- import { GraphQLResolveInfo } from 'graphql';
2
- import { Pool } from 'pg';
3
- /**
4
- * A stub for a `GraphQLResolveInfo` to return minimal info for specific
5
- * endpoint and include requested properties in selection set.
6
- */
7
- export declare const getGraphQLResolveInfoStub: (endpoint: string, ...properties: string[]) => GraphQLResolveInfo;
8
- /**
9
- * A stub for a pg Pool with explicit overrides for `query` and `release`
10
- */
11
- export declare const getPoolStub: (returnResult: (query: string) => unknown[]) => Pool;
12
- //# sourceMappingURL=stub-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stub-helpers.d.ts","sourceRoot":"","sources":["../../../src/performance/utils/stub-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAoB,MAAM,SAAS,CAAC;AAE/D,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE1B;;;GAGG;AACH,eAAO,MAAM,yBAAyB,aAC1B,MAAM,iBACD,MAAM,EAAE,KACtB,kBAWF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,yBACA,MAAM,KAAK,OAAO,EAAE,KACzC,IAWF,CAAC"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPoolStub = exports.getGraphQLResolveInfoStub = void 0;
4
- const jest_auto_stub_1 = require("jest-auto-stub");
5
- /**
6
- * A stub for a `GraphQLResolveInfo` to return minimal info for specific
7
- * endpoint and include requested properties in selection set.
8
- */
9
- const getGraphQLResolveInfoStub = (endpoint, ...properties) => {
10
- return (0, jest_auto_stub_1.stub)({
11
- fieldNodes: [
12
- {
13
- name: { value: endpoint },
14
- selectionSet: (0, jest_auto_stub_1.stub)({
15
- selections: properties.map((p) => ({ name: { value: p } })),
16
- }),
17
- },
18
- ],
19
- });
20
- };
21
- exports.getGraphQLResolveInfoStub = getGraphQLResolveInfoStub;
22
- /**
23
- * A stub for a pg Pool with explicit overrides for `query` and `release`
24
- */
25
- const getPoolStub = (returnResult) => {
26
- return (0, jest_auto_stub_1.stub)({
27
- connect: () => ({
28
- query: (q) => ({
29
- rows: returnResult(q),
30
- }),
31
- release: () => {
32
- return;
33
- },
34
- }),
35
- });
36
- };
37
- exports.getPoolStub = getPoolStub;
38
- //# sourceMappingURL=stub-helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stub-helpers.js","sourceRoot":"","sources":["../../../src/performance/utils/stub-helpers.ts"],"names":[],"mappings":";;;AACA,mDAAsC;AAGtC;;;GAGG;AACI,MAAM,yBAAyB,GAAG,CACvC,QAAgB,EAChB,GAAG,UAAoB,EACH,EAAE;IACtB,OAAO,IAAA,qBAAI,EAAqB;QAC9B,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE;gBACzB,YAAY,EAAE,IAAA,qBAAI,EAAmB;oBACnC,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;iBAC5D,CAAC;aACH;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAdW,QAAA,yBAAyB,6BAcpC;AAEF;;GAEG;AACI,MAAM,WAAW,GAAG,CACzB,YAA0C,EACpC,EAAE;IACR,OAAO,IAAA,qBAAI,EAAO;QAChB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;YACd,KAAK,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC;gBACrB,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC;aACtB,CAAC;YACF,OAAO,EAAE,GAAG,EAAE;gBACZ,OAAO;YACT,CAAC;SACF,CAAC;KACH,CAAC,CAAC;AACL,CAAC,CAAC;AAbW,QAAA,WAAW,eAatB"}