@studiosonrai/nestjs-testfx 1.0.0

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.
Files changed (36) hide show
  1. package/README.md +666 -0
  2. package/dist/src/factories/base.factory.d.ts +49 -0
  3. package/dist/src/factories/base.factory.js +75 -0
  4. package/dist/src/factories/base.factory.js.map +1 -0
  5. package/dist/src/factories/example.factory.d.ts +44 -0
  6. package/dist/src/factories/example.factory.js +117 -0
  7. package/dist/src/factories/example.factory.js.map +1 -0
  8. package/dist/src/factories/index.d.ts +2 -0
  9. package/dist/src/factories/index.js +10 -0
  10. package/dist/src/factories/index.js.map +1 -0
  11. package/dist/src/fixtures/example.fixture.d.ts +28 -0
  12. package/dist/src/fixtures/example.fixture.js +112 -0
  13. package/dist/src/fixtures/example.fixture.js.map +1 -0
  14. package/dist/src/fixtures/index.d.ts +1 -0
  15. package/dist/src/fixtures/index.js +13 -0
  16. package/dist/src/fixtures/index.js.map +1 -0
  17. package/dist/src/helpers/database-test.helper.d.ts +29 -0
  18. package/dist/src/helpers/database-test.helper.js +154 -0
  19. package/dist/src/helpers/database-test.helper.js.map +1 -0
  20. package/dist/src/helpers/index.d.ts +1 -0
  21. package/dist/src/helpers/index.js +6 -0
  22. package/dist/src/helpers/index.js.map +1 -0
  23. package/dist/src/index.d.ts +4 -0
  24. package/dist/src/index.js +23 -0
  25. package/dist/src/index.js.map +1 -0
  26. package/dist/src/jest.setup.template.d.ts +9 -0
  27. package/dist/src/jest.setup.template.js +31 -0
  28. package/dist/src/jest.setup.template.js.map +1 -0
  29. package/dist/src/matchers/entity-comparator.d.ts +28 -0
  30. package/dist/src/matchers/entity-comparator.js +163 -0
  31. package/dist/src/matchers/entity-comparator.js.map +1 -0
  32. package/dist/src/matchers/index.d.ts +1 -0
  33. package/dist/src/matchers/index.js +7 -0
  34. package/dist/src/matchers/index.js.map +1 -0
  35. package/dist/tsconfig.tsbuildinfo +1 -0
  36. package/package.json +51 -0
@@ -0,0 +1,4 @@
1
+ export { DatabaseTestHelper, DatabaseTestHelperConfig, } from './helpers';
2
+ export { BaseFactory, EntityFactory, FactoryOptions, ExampleUserFactory, ExampleOrderFactory, ExampleFactoryManager, } from './factories';
3
+ export { EntityComparator, ComparisonOptions, ComparisonResult, EntityEquivalentMatcher, createEntityEquivalentMatcher, } from './matchers';
4
+ export { RoleFixture, ROLE_FIXTURES, getAllRoleFixtures, getRoleById, getRoleByName, StatusFixture, ORDER_STATUS_FIXTURES, getAllOrderStatusFixtures, getOrderStatusByCode, ExampleFixtureLoader, } from './fixtures';
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExampleFixtureLoader = exports.getOrderStatusByCode = exports.getAllOrderStatusFixtures = exports.ORDER_STATUS_FIXTURES = exports.getRoleByName = exports.getRoleById = exports.getAllRoleFixtures = exports.ROLE_FIXTURES = exports.createEntityEquivalentMatcher = exports.EntityComparator = exports.ExampleFactoryManager = exports.ExampleOrderFactory = exports.ExampleUserFactory = exports.BaseFactory = exports.DatabaseTestHelper = void 0;
4
+ var helpers_1 = require("./helpers");
5
+ Object.defineProperty(exports, "DatabaseTestHelper", { enumerable: true, get: function () { return helpers_1.DatabaseTestHelper; } });
6
+ var factories_1 = require("./factories");
7
+ Object.defineProperty(exports, "BaseFactory", { enumerable: true, get: function () { return factories_1.BaseFactory; } });
8
+ Object.defineProperty(exports, "ExampleUserFactory", { enumerable: true, get: function () { return factories_1.ExampleUserFactory; } });
9
+ Object.defineProperty(exports, "ExampleOrderFactory", { enumerable: true, get: function () { return factories_1.ExampleOrderFactory; } });
10
+ Object.defineProperty(exports, "ExampleFactoryManager", { enumerable: true, get: function () { return factories_1.ExampleFactoryManager; } });
11
+ var matchers_1 = require("./matchers");
12
+ Object.defineProperty(exports, "EntityComparator", { enumerable: true, get: function () { return matchers_1.EntityComparator; } });
13
+ Object.defineProperty(exports, "createEntityEquivalentMatcher", { enumerable: true, get: function () { return matchers_1.createEntityEquivalentMatcher; } });
14
+ var fixtures_1 = require("./fixtures");
15
+ Object.defineProperty(exports, "ROLE_FIXTURES", { enumerable: true, get: function () { return fixtures_1.ROLE_FIXTURES; } });
16
+ Object.defineProperty(exports, "getAllRoleFixtures", { enumerable: true, get: function () { return fixtures_1.getAllRoleFixtures; } });
17
+ Object.defineProperty(exports, "getRoleById", { enumerable: true, get: function () { return fixtures_1.getRoleById; } });
18
+ Object.defineProperty(exports, "getRoleByName", { enumerable: true, get: function () { return fixtures_1.getRoleByName; } });
19
+ Object.defineProperty(exports, "ORDER_STATUS_FIXTURES", { enumerable: true, get: function () { return fixtures_1.ORDER_STATUS_FIXTURES; } });
20
+ Object.defineProperty(exports, "getAllOrderStatusFixtures", { enumerable: true, get: function () { return fixtures_1.getAllOrderStatusFixtures; } });
21
+ Object.defineProperty(exports, "getOrderStatusByCode", { enumerable: true, get: function () { return fixtures_1.getOrderStatusByCode; } });
22
+ Object.defineProperty(exports, "ExampleFixtureLoader", { enumerable: true, get: function () { return fixtures_1.ExampleFixtureLoader; } });
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AA2CA,qCAGmB;AAFjB,6GAAA,kBAAkB,OAAA;AAKpB,yCAOqB;AANnB,wGAAA,WAAW,OAAA;AAGX,+GAAA,kBAAkB,OAAA;AAClB,gHAAA,mBAAmB,OAAA;AACnB,kHAAA,qBAAqB,OAAA;AAIvB,uCAMoB;AALlB,4GAAA,gBAAgB,OAAA;AAIhB,yHAAA,6BAA6B,OAAA;AAI/B,uCAWoB;AATlB,yGAAA,aAAa,OAAA;AACb,8GAAA,kBAAkB,OAAA;AAClB,uGAAA,WAAW,OAAA;AACX,yGAAA,aAAa,OAAA;AAEb,iHAAA,qBAAqB,OAAA;AACrB,qHAAA,yBAAyB,OAAA;AACzB,gHAAA,oBAAoB,OAAA;AACpB,gHAAA,oBAAoB,OAAA"}
@@ -0,0 +1,9 @@
1
+ import { ComparisonOptions } from './matchers/entity-comparator';
2
+ declare global {
3
+ namespace jest {
4
+ interface Matchers<R> {
5
+ toBeEntityEquivalent(expected: unknown, options?: ComparisonOptions): R;
6
+ }
7
+ }
8
+ }
9
+ export {};
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const dotenv_1 = require("dotenv");
4
+ const entity_comparator_1 = require("./matchers/entity-comparator");
5
+ const ENV_FILE_PATH = '.ci.env';
6
+ const EXPECTED_NODE_ENV = 'ci';
7
+ const TEST_DB_PATTERN = /test|ci|_test$/i;
8
+ const TEST_TIMEOUT_MS = 30000;
9
+ (0, dotenv_1.config)({ path: ENV_FILE_PATH });
10
+ jest.setTimeout(TEST_TIMEOUT_MS);
11
+ beforeAll(() => {
12
+ if (process.env.NODE_ENV !== EXPECTED_NODE_ENV) {
13
+ throw new Error(`Tests must run with NODE_ENV=${EXPECTED_NODE_ENV}. ` +
14
+ `Current: NODE_ENV=${process.env.NODE_ENV}. ` +
15
+ `Hint: Run with "cross-env NODE_ENV=${EXPECTED_NODE_ENV} jest"`);
16
+ }
17
+ const dbName = process.env.DB_DATABASE || process.env.DATABASE_NAME || '';
18
+ if (!TEST_DB_PATTERN.test(dbName)) {
19
+ throw new Error(`Tests must use a test database (name should contain 'test' or 'ci'). ` +
20
+ `Current database: "${dbName}". ` +
21
+ `This check prevents accidentally running tests against production.`);
22
+ }
23
+ });
24
+ process.on('unhandledRejection', (reason, promise) => {
25
+ console.error('Unhandled Rejection at:', promise);
26
+ console.error('Reason:', reason);
27
+ });
28
+ expect.extend({
29
+ toBeEntityEquivalent: (0, entity_comparator_1.createEntityEquivalentMatcher)(),
30
+ });
31
+ //# sourceMappingURL=jest.setup.template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest.setup.template.js","sourceRoot":"","sources":["../../src/jest.setup.template.ts"],"names":[],"mappings":";;AA4BA,m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
3
+ strict?: boolean;
4
+ deep?: boolean;
5
+ customComparators?: Record<string, (a: unknown, b: unknown) => boolean>;
6
+ }
7
+ export interface ComparisonResult {
8
+ areEqual: boolean;
9
+ details?: {
10
+ received?: unknown;
11
+ expected?: unknown;
12
+ differentFields?: string[];
13
+ options?: ComparisonOptions;
14
+ };
15
+ }
16
+ export declare class EntityComparator {
17
+ static compare(received: unknown, expected: unknown, options?: ComparisonOptions): ComparisonResult;
18
+ static formatComparisonResult(comparison: ComparisonResult): string;
19
+ static compareSubset(received: unknown, expectedSubset: Record<string, unknown>, options?: Omit<ComparisonOptions, 'ignoreFields'>): ComparisonResult;
20
+ }
21
+ export type EntityEquivalentMatcher = (expected: unknown, options?: ComparisonOptions) => {
22
+ pass: boolean;
23
+ message: () => string;
24
+ };
25
+ export declare function createEntityEquivalentMatcher(): (received: unknown, expected: unknown, options?: ComparisonOptions) => {
26
+ pass: boolean;
27
+ message: () => string;
28
+ };
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityComparator = void 0;
4
+ exports.createEntityEquivalentMatcher = createEntityEquivalentMatcher;
5
+ class EntityComparator {
6
+ static compare(received, expected, options = {}) {
7
+ const { ignoreFields = [], strict = true, deep = true, customComparators = {}, } = options;
8
+ if (received === null && expected === null) {
9
+ return { areEqual: true };
10
+ }
11
+ if (received === undefined && expected === undefined) {
12
+ return { areEqual: true };
13
+ }
14
+ if (received === null || expected === null) {
15
+ return {
16
+ areEqual: false,
17
+ details: { received, expected, options },
18
+ };
19
+ }
20
+ if (received === undefined || expected === undefined) {
21
+ return {
22
+ areEqual: false,
23
+ details: { received, expected, options },
24
+ };
25
+ }
26
+ if (typeof received !== 'object' || typeof expected !== 'object') {
27
+ const areEqual = strict ? received === expected : received == expected;
28
+ return areEqual
29
+ ? { areEqual: true }
30
+ : { areEqual: false, details: { received, expected, options } };
31
+ }
32
+ if (Array.isArray(received) && Array.isArray(expected)) {
33
+ if (received.length !== expected.length) {
34
+ return {
35
+ areEqual: false,
36
+ details: {
37
+ received,
38
+ expected,
39
+ differentFields: ['length'],
40
+ options,
41
+ },
42
+ };
43
+ }
44
+ for (let i = 0; i < received.length; i++) {
45
+ const itemResult = deep
46
+ ? this.compare(received[i], expected[i], options)
47
+ : { areEqual: received[i] === expected[i] };
48
+ if (!itemResult.areEqual) {
49
+ return {
50
+ areEqual: false,
51
+ details: {
52
+ received,
53
+ expected,
54
+ differentFields: [`[${i}]`],
55
+ options,
56
+ },
57
+ };
58
+ }
59
+ }
60
+ return { areEqual: true };
61
+ }
62
+ const receivedObj = received;
63
+ const expectedObj = expected;
64
+ const differentFields = [];
65
+ const allKeys = new Set([
66
+ ...Object.keys(receivedObj),
67
+ ...Object.keys(expectedObj),
68
+ ]);
69
+ for (const key of allKeys) {
70
+ if (ignoreFields.includes(key)) {
71
+ continue;
72
+ }
73
+ const receivedValue = receivedObj[key];
74
+ const expectedValue = expectedObj[key];
75
+ if (customComparators[key]) {
76
+ if (!customComparators[key](receivedValue, expectedValue)) {
77
+ differentFields.push(key);
78
+ }
79
+ continue;
80
+ }
81
+ if (deep && typeof receivedValue === 'object' && typeof expectedValue === 'object') {
82
+ const nestedResult = this.compare(receivedValue, expectedValue, options);
83
+ if (!nestedResult.areEqual) {
84
+ differentFields.push(key);
85
+ }
86
+ continue;
87
+ }
88
+ if (receivedValue instanceof Date && expectedValue instanceof Date) {
89
+ if (receivedValue.getTime() !== expectedValue.getTime()) {
90
+ differentFields.push(key);
91
+ }
92
+ continue;
93
+ }
94
+ const areEqual = strict
95
+ ? receivedValue === expectedValue
96
+ : receivedValue == expectedValue;
97
+ if (!areEqual) {
98
+ differentFields.push(key);
99
+ }
100
+ }
101
+ if (differentFields.length > 0) {
102
+ return {
103
+ areEqual: false,
104
+ details: {
105
+ received,
106
+ expected,
107
+ differentFields,
108
+ options,
109
+ },
110
+ };
111
+ }
112
+ return { areEqual: true };
113
+ }
114
+ static formatComparisonResult(comparison) {
115
+ if (comparison.areEqual) {
116
+ return 'Entities are equivalent';
117
+ }
118
+ const lines = ['Entities are not equivalent.'];
119
+ if (comparison.details?.differentFields?.length) {
120
+ lines.push(`Different fields: ${comparison.details.differentFields.join(', ')}`);
121
+ }
122
+ lines.push(`Received: ${JSON.stringify(comparison.details?.received, null, 2)}`);
123
+ lines.push(`Expected: ${JSON.stringify(comparison.details?.expected, null, 2)}`);
124
+ return lines.join('\n');
125
+ }
126
+ static compareSubset(received, expectedSubset, options = {}) {
127
+ if (typeof received !== 'object' || received === null) {
128
+ return {
129
+ areEqual: false,
130
+ details: {
131
+ received,
132
+ expected: expectedSubset,
133
+ },
134
+ };
135
+ }
136
+ const receivedObj = received;
137
+ const fieldsToCheck = Object.keys(expectedSubset);
138
+ const receivedSubset = {};
139
+ for (const field of fieldsToCheck) {
140
+ receivedSubset[field] = receivedObj[field];
141
+ }
142
+ return this.compare(receivedSubset, expectedSubset, options);
143
+ }
144
+ }
145
+ exports.EntityComparator = EntityComparator;
146
+ function createEntityEquivalentMatcher() {
147
+ return function (received, expected, options = {}) {
148
+ const comparison = EntityComparator.compare(received, expected, options);
149
+ if (comparison.areEqual) {
150
+ return {
151
+ message: () => 'Entities are equivalent',
152
+ pass: true,
153
+ };
154
+ }
155
+ else {
156
+ return {
157
+ message: () => EntityComparator.formatComparisonResult(comparison),
158
+ pass: false,
159
+ };
160
+ }
161
+ };
162
+ }
163
+ //# sourceMappingURL=entity-comparator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-comparator.js","sourceRoot":"","sources":["../../../src/matchers/entity-comparator.ts"],"names":[],"mappings":";;;AAqZA,sEAwBC;AAvUD,MAAa,gBAAgB;IA2B3B,MAAM,CAAC,OAAO,CACZ,QAAiB,EACjB,QAAiB,EACjB,UAA6B,EAAE;QAE/B,MAAM,EACJ,YAAY,GAAG,EAAE,EACjB,MAAM,GAAG,IAAI,EACb,IAAI,GAAG,IAAI,EACX,iBAAiB,GAAG,EAAE,GACvB,G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GAA4B,EAAE,CAAC;QAEnD,KAAK,MAAM,KAAK,IAAI,aAAa,EAAE,CAAC;YAClC,cAAc,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AApQD,4CAoQC;AA2CD,SAAgB,6BAA6B;IAK3C,OAAO,UACL,QAAiB,EACjB,QAAiB,EACjB,UAA6B,EAAE;QAE/B,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QAEzE,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,OAAO;gBACL,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB;gBACxC,IAAI,EAAE,IAAI;aACX,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,UAAU,CAAC;gBAClE,IAAI,EAAE,KAAK;aACZ,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export { EntityComparator, ComparisonOptions, ComparisonResult, EntityEquivalentMatcher, createEntityEquivalentMatcher, } from './entity-comparator';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createEntityEquivalentMatcher = exports.EntityComparator = void 0;
4
+ var entity_comparator_1 = require("./entity-comparator");
5
+ Object.defineProperty(exports, "EntityComparator", { enumerable: true, get: function () { return entity_comparator_1.EntityComparator; } });
6
+ Object.defineProperty(exports, "createEntityEquivalentMatcher", { enumerable: true, get: function () { return entity_comparator_1.createEntityEquivalentMatcher; } });
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/matchers/index.ts"],"names":[],"mappings":";;;AAMA,yDAM6B;AAL3B,qHAAA,gBAAgB,OAAA;AAIhB,kIAAA,6BAA6B,OAAA"}