@geekmidas/testkit 0.0.6 → 0.0.8
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/dist/Factory-WMhTNZ9S.cjs +56 -0
- package/dist/Factory-z2m01hMj.mjs +50 -0
- package/dist/Factory.cjs +1 -1
- package/dist/Factory.mjs +1 -1
- package/dist/KyselyFactory-Bdq1s1Go.cjs +215 -0
- package/dist/KyselyFactory-ELiHgHVv.mjs +210 -0
- package/dist/KyselyFactory.cjs +3 -3
- package/dist/KyselyFactory.mjs +3 -3
- package/dist/ObjectionFactory-89p-FFEw.mjs +178 -0
- package/dist/ObjectionFactory-C47B03Ot.cjs +183 -0
- package/dist/ObjectionFactory.cjs +2 -2
- package/dist/ObjectionFactory.mjs +2 -2
- package/dist/PostgresKyselyMigrator-Bs31emFd.cjs +87 -0
- package/dist/PostgresKyselyMigrator-ChIpZFYB.mjs +81 -0
- package/dist/PostgresKyselyMigrator.cjs +2 -2
- package/dist/PostgresKyselyMigrator.mjs +2 -2
- package/dist/PostgresMigrator-BtAWdLss.cjs +151 -0
- package/dist/PostgresMigrator-BzqksJcW.mjs +145 -0
- package/dist/PostgresMigrator.cjs +1 -1
- package/dist/PostgresMigrator.mjs +1 -1
- package/dist/VitestKyselyTransactionIsolator-AfxPJEwR.mjs +58 -0
- package/dist/VitestKyselyTransactionIsolator-YWnSJiIH.cjs +63 -0
- package/dist/VitestKyselyTransactionIsolator.cjs +2 -2
- package/dist/VitestKyselyTransactionIsolator.mjs +2 -2
- package/dist/VitestObjectionTransactionIsolator-0uX6DW5G.cjs +66 -0
- package/dist/VitestObjectionTransactionIsolator-BZRYy8iW.mjs +61 -0
- package/dist/VitestObjectionTransactionIsolator.cjs +4 -0
- package/dist/VitestObjectionTransactionIsolator.mjs +4 -0
- package/dist/VitestTransactionIsolator-DcOz0LZF.cjs +129 -0
- package/dist/VitestTransactionIsolator-kFL36T8x.mjs +117 -0
- package/dist/VitestTransactionIsolator.cjs +1 -1
- package/dist/VitestTransactionIsolator.mjs +1 -1
- package/dist/__tests__/Factory.spec.cjs +1 -1
- package/dist/__tests__/Factory.spec.mjs +1 -1
- package/dist/__tests__/KyselyFactory.spec.cjs +10 -10
- package/dist/__tests__/KyselyFactory.spec.mjs +10 -10
- package/dist/__tests__/ObjectionFactory.spec.cjs +3 -3
- package/dist/__tests__/ObjectionFactory.spec.mjs +3 -3
- package/dist/__tests__/PostgresMigrator.spec.cjs +2 -2
- package/dist/__tests__/PostgresMigrator.spec.mjs +2 -2
- package/dist/__tests__/faker.spec.cjs +1 -1
- package/dist/__tests__/faker.spec.mjs +1 -1
- package/dist/__tests__/integration.spec.cjs +10 -10
- package/dist/__tests__/integration.spec.mjs +10 -10
- package/dist/example.cjs +3 -3
- package/dist/example.mjs +3 -3
- package/dist/faker-CxKkEeYi.mjs +227 -0
- package/dist/faker-SMN4ira4.cjs +263 -0
- package/dist/faker.cjs +1 -1
- package/dist/faker.mjs +1 -1
- package/dist/helpers-CKMlwSYT.mjs +47 -0
- package/dist/helpers-H4hO5SZR.cjs +53 -0
- package/dist/helpers.cjs +1 -1
- package/dist/helpers.mjs +1 -1
- package/dist/kysely-B-GOhABm.cjs +72 -0
- package/dist/kysely-CqfoKVXs.mjs +67 -0
- package/dist/kysely.cjs +10 -8
- package/dist/kysely.mjs +9 -9
- package/dist/objection.cjs +86 -3
- package/dist/objection.mjs +83 -3
- package/package.json +2 -2
- package/src/Factory.ts +97 -0
- package/src/KyselyFactory.ts +180 -0
- package/src/ObjectionFactory.ts +145 -3
- package/src/PostgresKyselyMigrator.ts +54 -0
- package/src/PostgresMigrator.ts +90 -0
- package/src/VitestKyselyTransactionIsolator.ts +46 -0
- package/src/VitestObjectionTransactionIsolator.ts +74 -0
- package/src/VitestTransactionIsolator.ts +95 -0
- package/src/__tests__/VitestObjectionTransactionIsolator.spec.ts +144 -0
- package/src/faker.ts +158 -7
- package/src/helpers.ts +34 -0
- package/src/kysely.ts +63 -0
- package/src/objection.ts +95 -0
- package/test/helpers.ts +3 -1
- package/dist/Factory-DREHoms3.cjs +0 -15
- package/dist/Factory-DlzMkMzb.mjs +0 -9
- package/dist/KyselyFactory-BX7Kv2uP.cjs +0 -65
- package/dist/KyselyFactory-pOMOFQWE.mjs +0 -60
- package/dist/ObjectionFactory-BlkzSEqo.cjs +0 -41
- package/dist/ObjectionFactory-ChuX8sZN.mjs +0 -36
- package/dist/PostgresKyselyMigrator-D8fm35-s.mjs +0 -27
- package/dist/PostgresKyselyMigrator-JTY2LfwD.cjs +0 -33
- package/dist/PostgresMigrator-Bz-tnjB6.cjs +0 -67
- package/dist/PostgresMigrator-CEoRKTdq.mjs +0 -61
- package/dist/VitestKyselyTransactionIsolator-D-qpeVKO.mjs +0 -12
- package/dist/VitestKyselyTransactionIsolator-jF6Ohyu_.cjs +0 -17
- package/dist/VitestTransactionIsolator-BK9UsrKt.cjs +0 -53
- package/dist/VitestTransactionIsolator-e-R3p_X8.mjs +0 -41
- package/dist/faker-BwaXA_RF.mjs +0 -85
- package/dist/faker-caz-8zt8.cjs +0 -121
- package/dist/helpers-DN4sJO4i.mjs +0 -13
- package/dist/helpers-DOtYCEvZ.cjs +0 -19
- package/dist/kysely-C1-aHdnU.mjs +0 -11
- package/dist/kysely-DL3C2eM4.cjs +0 -16
- /package/dist/{helpers-B2CfbaTC.cjs → helpers-Bnm3Jy9X.cjs} +0 -0
- /package/dist/{helpers-Rf5F71r9.mjs → helpers-CukcFAU9.mjs} +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/VitestTransactionIsolator.ts
|
|
3
|
+
/**
|
|
4
|
+
* PostgreSQL transaction isolation levels.
|
|
5
|
+
* Controls the visibility of concurrent transactions.
|
|
6
|
+
*
|
|
7
|
+
* @see https://www.postgresql.org/docs/current/transaction-iso.html
|
|
8
|
+
*/
|
|
9
|
+
let IsolationLevel = /* @__PURE__ */ function(IsolationLevel$1) {
|
|
10
|
+
/**
|
|
11
|
+
* Lowest isolation level. Allows dirty reads.
|
|
12
|
+
* Not recommended for testing.
|
|
13
|
+
*/
|
|
14
|
+
IsolationLevel$1["READ_UNCOMMITTED"] = "READ UNCOMMITTED";
|
|
15
|
+
/**
|
|
16
|
+
* Default PostgreSQL isolation level.
|
|
17
|
+
* Prevents dirty reads but allows non-repeatable reads.
|
|
18
|
+
*/
|
|
19
|
+
IsolationLevel$1["READ_COMMITTED"] = "READ COMMITTED";
|
|
20
|
+
/**
|
|
21
|
+
* Prevents dirty reads and non-repeatable reads.
|
|
22
|
+
* Recommended for most test scenarios.
|
|
23
|
+
*/
|
|
24
|
+
IsolationLevel$1["REPEATABLE_READ"] = "REPEATABLE READ";
|
|
25
|
+
/**
|
|
26
|
+
* Highest isolation level. Prevents all phenomena.
|
|
27
|
+
* May cause performance overhead in tests.
|
|
28
|
+
*/
|
|
29
|
+
IsolationLevel$1["SERIALIZABLE"] = "SERIALIZABLE";
|
|
30
|
+
return IsolationLevel$1;
|
|
31
|
+
}({});
|
|
32
|
+
/**
|
|
33
|
+
* Abstract base class for implementing database transaction isolation in Vitest tests.
|
|
34
|
+
* Provides automatic transaction rollback after each test to maintain test isolation.
|
|
35
|
+
* Subclasses must implement the transact() method for their specific database driver.
|
|
36
|
+
*
|
|
37
|
+
* @template Connection - The database connection type
|
|
38
|
+
* @template Transaction - The transaction type
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* // Implement for your database driver
|
|
43
|
+
* class MyDatabaseIsolator extends VitestPostgresTransactionIsolator<MyDB, MyTx> {
|
|
44
|
+
* async transact(conn: MyDB, level: IsolationLevel, fn: (tx: MyTx) => Promise<void>) {
|
|
45
|
+
* await conn.transaction(level, fn);
|
|
46
|
+
* }
|
|
47
|
+
* }
|
|
48
|
+
*
|
|
49
|
+
* // Use in tests
|
|
50
|
+
* const isolator = new MyDatabaseIsolator(test);
|
|
51
|
+
* const isolatedTest = isolator.wrapVitestWithTransaction(db);
|
|
52
|
+
*
|
|
53
|
+
* isolatedTest('should create user', async ({ trx }) => {
|
|
54
|
+
* await trx.insert('users', { name: 'Test' });
|
|
55
|
+
* // Data is automatically rolled back after test
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
var VitestPostgresTransactionIsolator = class {
|
|
60
|
+
/**
|
|
61
|
+
* Creates a new VitestPostgresTransactionIsolator instance.
|
|
62
|
+
*
|
|
63
|
+
* @param api - The Vitest test API (usually the `test` export from vitest)
|
|
64
|
+
*/
|
|
65
|
+
constructor(api) {
|
|
66
|
+
this.api = api;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Creates a wrapped version of Vitest's test API that provides transaction isolation.
|
|
70
|
+
* Each test will run within a database transaction that is automatically rolled back.
|
|
71
|
+
*
|
|
72
|
+
* @param conn - The database connection to use
|
|
73
|
+
* @param setup - Optional setup function to run within the transaction before each test
|
|
74
|
+
* @param level - The transaction isolation level (defaults to REPEATABLE_READ)
|
|
75
|
+
* @returns A wrapped test API with transaction support
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* const isolatedTest = isolator.wrapVitestWithTransaction(db, async (trx) => {
|
|
80
|
+
* // Optional setup: create common test data
|
|
81
|
+
* await trx.insert('settings', { key: 'test', value: 'true' });
|
|
82
|
+
* });
|
|
83
|
+
*
|
|
84
|
+
* isolatedTest('test with transaction', async ({ trx }) => {
|
|
85
|
+
* const user = await trx.insert('users', { name: 'Test' });
|
|
86
|
+
* expect(user).toBeDefined();
|
|
87
|
+
* });
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
wrapVitestWithTransaction(conn, setup, level = IsolationLevel.REPEATABLE_READ) {
|
|
91
|
+
return this.api.extend({ trx: async ({}, use) => {
|
|
92
|
+
class TestRollback extends Error {
|
|
93
|
+
constructor() {
|
|
94
|
+
super("Test rollback");
|
|
95
|
+
this.name = "TestRollback";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
let testError;
|
|
99
|
+
try {
|
|
100
|
+
await this.transact(conn, level, async (transaction) => {
|
|
101
|
+
try {
|
|
102
|
+
await setup?.(transaction);
|
|
103
|
+
await use(transaction);
|
|
104
|
+
} catch (error) {
|
|
105
|
+
testError = error;
|
|
106
|
+
}
|
|
107
|
+
throw new TestRollback();
|
|
108
|
+
});
|
|
109
|
+
} catch (error) {
|
|
110
|
+
if (!(error instanceof TestRollback)) throw error;
|
|
111
|
+
if (testError) throw testError;
|
|
112
|
+
}
|
|
113
|
+
} });
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
Object.defineProperty(exports, 'IsolationLevel', {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: function () {
|
|
121
|
+
return IsolationLevel;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(exports, 'VitestPostgresTransactionIsolator', {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: function () {
|
|
127
|
+
return VitestPostgresTransactionIsolator;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
//#region src/VitestTransactionIsolator.ts
|
|
2
|
+
/**
|
|
3
|
+
* PostgreSQL transaction isolation levels.
|
|
4
|
+
* Controls the visibility of concurrent transactions.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.postgresql.org/docs/current/transaction-iso.html
|
|
7
|
+
*/
|
|
8
|
+
let IsolationLevel = /* @__PURE__ */ function(IsolationLevel$1) {
|
|
9
|
+
/**
|
|
10
|
+
* Lowest isolation level. Allows dirty reads.
|
|
11
|
+
* Not recommended for testing.
|
|
12
|
+
*/
|
|
13
|
+
IsolationLevel$1["READ_UNCOMMITTED"] = "READ UNCOMMITTED";
|
|
14
|
+
/**
|
|
15
|
+
* Default PostgreSQL isolation level.
|
|
16
|
+
* Prevents dirty reads but allows non-repeatable reads.
|
|
17
|
+
*/
|
|
18
|
+
IsolationLevel$1["READ_COMMITTED"] = "READ COMMITTED";
|
|
19
|
+
/**
|
|
20
|
+
* Prevents dirty reads and non-repeatable reads.
|
|
21
|
+
* Recommended for most test scenarios.
|
|
22
|
+
*/
|
|
23
|
+
IsolationLevel$1["REPEATABLE_READ"] = "REPEATABLE READ";
|
|
24
|
+
/**
|
|
25
|
+
* Highest isolation level. Prevents all phenomena.
|
|
26
|
+
* May cause performance overhead in tests.
|
|
27
|
+
*/
|
|
28
|
+
IsolationLevel$1["SERIALIZABLE"] = "SERIALIZABLE";
|
|
29
|
+
return IsolationLevel$1;
|
|
30
|
+
}({});
|
|
31
|
+
/**
|
|
32
|
+
* Abstract base class for implementing database transaction isolation in Vitest tests.
|
|
33
|
+
* Provides automatic transaction rollback after each test to maintain test isolation.
|
|
34
|
+
* Subclasses must implement the transact() method for their specific database driver.
|
|
35
|
+
*
|
|
36
|
+
* @template Connection - The database connection type
|
|
37
|
+
* @template Transaction - The transaction type
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* // Implement for your database driver
|
|
42
|
+
* class MyDatabaseIsolator extends VitestPostgresTransactionIsolator<MyDB, MyTx> {
|
|
43
|
+
* async transact(conn: MyDB, level: IsolationLevel, fn: (tx: MyTx) => Promise<void>) {
|
|
44
|
+
* await conn.transaction(level, fn);
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
*
|
|
48
|
+
* // Use in tests
|
|
49
|
+
* const isolator = new MyDatabaseIsolator(test);
|
|
50
|
+
* const isolatedTest = isolator.wrapVitestWithTransaction(db);
|
|
51
|
+
*
|
|
52
|
+
* isolatedTest('should create user', async ({ trx }) => {
|
|
53
|
+
* await trx.insert('users', { name: 'Test' });
|
|
54
|
+
* // Data is automatically rolled back after test
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
var VitestPostgresTransactionIsolator = class {
|
|
59
|
+
/**
|
|
60
|
+
* Creates a new VitestPostgresTransactionIsolator instance.
|
|
61
|
+
*
|
|
62
|
+
* @param api - The Vitest test API (usually the `test` export from vitest)
|
|
63
|
+
*/
|
|
64
|
+
constructor(api) {
|
|
65
|
+
this.api = api;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Creates a wrapped version of Vitest's test API that provides transaction isolation.
|
|
69
|
+
* Each test will run within a database transaction that is automatically rolled back.
|
|
70
|
+
*
|
|
71
|
+
* @param conn - The database connection to use
|
|
72
|
+
* @param setup - Optional setup function to run within the transaction before each test
|
|
73
|
+
* @param level - The transaction isolation level (defaults to REPEATABLE_READ)
|
|
74
|
+
* @returns A wrapped test API with transaction support
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* const isolatedTest = isolator.wrapVitestWithTransaction(db, async (trx) => {
|
|
79
|
+
* // Optional setup: create common test data
|
|
80
|
+
* await trx.insert('settings', { key: 'test', value: 'true' });
|
|
81
|
+
* });
|
|
82
|
+
*
|
|
83
|
+
* isolatedTest('test with transaction', async ({ trx }) => {
|
|
84
|
+
* const user = await trx.insert('users', { name: 'Test' });
|
|
85
|
+
* expect(user).toBeDefined();
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
wrapVitestWithTransaction(conn, setup, level = IsolationLevel.REPEATABLE_READ) {
|
|
90
|
+
return this.api.extend({ trx: async ({}, use) => {
|
|
91
|
+
class TestRollback extends Error {
|
|
92
|
+
constructor() {
|
|
93
|
+
super("Test rollback");
|
|
94
|
+
this.name = "TestRollback";
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
let testError;
|
|
98
|
+
try {
|
|
99
|
+
await this.transact(conn, level, async (transaction) => {
|
|
100
|
+
try {
|
|
101
|
+
await setup?.(transaction);
|
|
102
|
+
await use(transaction);
|
|
103
|
+
} catch (error) {
|
|
104
|
+
testError = error;
|
|
105
|
+
}
|
|
106
|
+
throw new TestRollback();
|
|
107
|
+
});
|
|
108
|
+
} catch (error) {
|
|
109
|
+
if (!(error instanceof TestRollback)) throw error;
|
|
110
|
+
if (testError) throw testError;
|
|
111
|
+
}
|
|
112
|
+
} });
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
export { IsolationLevel, VitestPostgresTransactionIsolator };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_VitestTransactionIsolator = require('./VitestTransactionIsolator-
|
|
1
|
+
const require_VitestTransactionIsolator = require('./VitestTransactionIsolator-DcOz0LZF.cjs');
|
|
2
2
|
|
|
3
3
|
exports.IsolationLevel = require_VitestTransactionIsolator.IsolationLevel;
|
|
4
4
|
exports.VitestPostgresTransactionIsolator = require_VitestTransactionIsolator.VitestPostgresTransactionIsolator;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IsolationLevel, VitestPostgresTransactionIsolator } from "./VitestTransactionIsolator-
|
|
1
|
+
import { IsolationLevel, VitestPostgresTransactionIsolator } from "./VitestTransactionIsolator-kFL36T8x.mjs";
|
|
2
2
|
|
|
3
3
|
export { IsolationLevel, VitestPostgresTransactionIsolator };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_Factory = require('../Factory-
|
|
2
|
+
const require_Factory = require('../Factory-WMhTNZ9S.cjs');
|
|
3
3
|
const vitest = require_chunk.__toESM(require("vitest"));
|
|
4
4
|
|
|
5
5
|
//#region src/__tests__/Factory.spec.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
-
require('../Factory-
|
|
3
|
-
require('../faker-
|
|
4
|
-
const require_KyselyFactory = require('../KyselyFactory-
|
|
5
|
-
require('../PostgresMigrator-
|
|
6
|
-
require('../PostgresKyselyMigrator-
|
|
7
|
-
require('../VitestTransactionIsolator-
|
|
8
|
-
require('../VitestKyselyTransactionIsolator-
|
|
9
|
-
const require_helpers = require('../helpers-
|
|
10
|
-
const require_kysely = require('../kysely-
|
|
11
|
-
const require_helpers$1 = require('../helpers-
|
|
2
|
+
require('../Factory-WMhTNZ9S.cjs');
|
|
3
|
+
require('../faker-SMN4ira4.cjs');
|
|
4
|
+
const require_KyselyFactory = require('../KyselyFactory-Bdq1s1Go.cjs');
|
|
5
|
+
require('../PostgresMigrator-BtAWdLss.cjs');
|
|
6
|
+
require('../PostgresKyselyMigrator-Bs31emFd.cjs');
|
|
7
|
+
require('../VitestTransactionIsolator-DcOz0LZF.cjs');
|
|
8
|
+
require('../VitestKyselyTransactionIsolator-YWnSJiIH.cjs');
|
|
9
|
+
const require_helpers = require('../helpers-H4hO5SZR.cjs');
|
|
10
|
+
const require_kysely = require('../kysely-B-GOhABm.cjs');
|
|
11
|
+
const require_helpers$1 = require('../helpers-Bnm3Jy9X.cjs');
|
|
12
12
|
const pg = require_chunk.__toESM(require("pg"));
|
|
13
13
|
const vitest = require_chunk.__toESM(require("vitest"));
|
|
14
14
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../Factory-
|
|
2
|
-
import "../faker-
|
|
3
|
-
import { KyselyFactory } from "../KyselyFactory-
|
|
4
|
-
import "../PostgresMigrator-
|
|
5
|
-
import "../PostgresKyselyMigrator-
|
|
6
|
-
import "../VitestTransactionIsolator-
|
|
7
|
-
import "../VitestKyselyTransactionIsolator-
|
|
8
|
-
import { createKyselyDb } from "../helpers-
|
|
9
|
-
import { wrapVitestKyselyTransaction } from "../kysely-
|
|
10
|
-
import { TEST_DATABASE_CONFIG, createTestTables } from "../helpers-
|
|
1
|
+
import "../Factory-z2m01hMj.mjs";
|
|
2
|
+
import "../faker-CxKkEeYi.mjs";
|
|
3
|
+
import { KyselyFactory } from "../KyselyFactory-ELiHgHVv.mjs";
|
|
4
|
+
import "../PostgresMigrator-BzqksJcW.mjs";
|
|
5
|
+
import "../PostgresKyselyMigrator-ChIpZFYB.mjs";
|
|
6
|
+
import "../VitestTransactionIsolator-kFL36T8x.mjs";
|
|
7
|
+
import "../VitestKyselyTransactionIsolator-AfxPJEwR.mjs";
|
|
8
|
+
import { createKyselyDb } from "../helpers-CKMlwSYT.mjs";
|
|
9
|
+
import { wrapVitestKyselyTransaction } from "../kysely-CqfoKVXs.mjs";
|
|
10
|
+
import { TEST_DATABASE_CONFIG, createTestTables } from "../helpers-CukcFAU9.mjs";
|
|
11
11
|
import pg from "pg";
|
|
12
12
|
import { describe, expect, it } from "vitest";
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
-
require('../Factory-
|
|
3
|
-
const require_ObjectionFactory = require('../ObjectionFactory-
|
|
4
|
-
const require_helpers = require('../helpers-
|
|
2
|
+
require('../Factory-WMhTNZ9S.cjs');
|
|
3
|
+
const require_ObjectionFactory = require('../ObjectionFactory-C47B03Ot.cjs');
|
|
4
|
+
const require_helpers = require('../helpers-Bnm3Jy9X.cjs');
|
|
5
5
|
const vitest = require_chunk.__toESM(require("vitest"));
|
|
6
6
|
const objection = require_chunk.__toESM(require("objection"));
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../Factory-
|
|
2
|
-
import { ObjectionFactory } from "../ObjectionFactory-
|
|
3
|
-
import { setupKnexTest } from "../helpers-
|
|
1
|
+
import "../Factory-z2m01hMj.mjs";
|
|
2
|
+
import { ObjectionFactory } from "../ObjectionFactory-89p-FFEw.mjs";
|
|
3
|
+
import { setupKnexTest } from "../helpers-CukcFAU9.mjs";
|
|
4
4
|
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
5
5
|
import { Model } from "objection";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_PostgresMigrator = require('../PostgresMigrator-
|
|
3
|
-
const require_helpers = require('../helpers-
|
|
2
|
+
const require_PostgresMigrator = require('../PostgresMigrator-BtAWdLss.cjs');
|
|
3
|
+
const require_helpers = require('../helpers-Bnm3Jy9X.cjs');
|
|
4
4
|
const pg = require_chunk.__toESM(require("pg"));
|
|
5
5
|
const vitest = require_chunk.__toESM(require("vitest"));
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PostgresMigrator } from "../PostgresMigrator-
|
|
2
|
-
import { createTestDatabase } from "../helpers-
|
|
1
|
+
import { PostgresMigrator } from "../PostgresMigrator-BzqksJcW.mjs";
|
|
2
|
+
import { createTestDatabase } from "../helpers-CukcFAU9.mjs";
|
|
3
3
|
import { Client } from "pg";
|
|
4
4
|
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_faker = require('../faker-
|
|
2
|
+
const require_faker = require('../faker-SMN4ira4.cjs');
|
|
3
3
|
const vitest = require_chunk.__toESM(require("vitest"));
|
|
4
4
|
|
|
5
5
|
//#region src/__tests__/faker.spec.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
-
require('../Factory-
|
|
3
|
-
require('../faker-
|
|
4
|
-
const require_KyselyFactory = require('../KyselyFactory-
|
|
5
|
-
require('../PostgresMigrator-
|
|
6
|
-
require('../PostgresKyselyMigrator-
|
|
7
|
-
require('../VitestTransactionIsolator-
|
|
8
|
-
require('../VitestKyselyTransactionIsolator-
|
|
9
|
-
const require_helpers = require('../helpers-
|
|
10
|
-
const require_kysely = require('../kysely-
|
|
11
|
-
const require_helpers$1 = require('../helpers-
|
|
2
|
+
require('../Factory-WMhTNZ9S.cjs');
|
|
3
|
+
require('../faker-SMN4ira4.cjs');
|
|
4
|
+
const require_KyselyFactory = require('../KyselyFactory-Bdq1s1Go.cjs');
|
|
5
|
+
require('../PostgresMigrator-BtAWdLss.cjs');
|
|
6
|
+
require('../PostgresKyselyMigrator-Bs31emFd.cjs');
|
|
7
|
+
require('../VitestTransactionIsolator-DcOz0LZF.cjs');
|
|
8
|
+
require('../VitestKyselyTransactionIsolator-YWnSJiIH.cjs');
|
|
9
|
+
const require_helpers = require('../helpers-H4hO5SZR.cjs');
|
|
10
|
+
const require_kysely = require('../kysely-B-GOhABm.cjs');
|
|
11
|
+
const require_helpers$1 = require('../helpers-Bnm3Jy9X.cjs');
|
|
12
12
|
const vitest = require_chunk.__toESM(require("vitest"));
|
|
13
13
|
|
|
14
14
|
//#region src/__tests__/integration.spec.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../Factory-
|
|
2
|
-
import "../faker-
|
|
3
|
-
import { KyselyFactory } from "../KyselyFactory-
|
|
4
|
-
import "../PostgresMigrator-
|
|
5
|
-
import "../PostgresKyselyMigrator-
|
|
6
|
-
import "../VitestTransactionIsolator-
|
|
7
|
-
import "../VitestKyselyTransactionIsolator-
|
|
8
|
-
import { createKyselyDb } from "../helpers-
|
|
9
|
-
import { wrapVitestKyselyTransaction } from "../kysely-
|
|
10
|
-
import { TEST_DATABASE_CONFIG, createTestTables } from "../helpers-
|
|
1
|
+
import "../Factory-z2m01hMj.mjs";
|
|
2
|
+
import "../faker-CxKkEeYi.mjs";
|
|
3
|
+
import { KyselyFactory } from "../KyselyFactory-ELiHgHVv.mjs";
|
|
4
|
+
import "../PostgresMigrator-BzqksJcW.mjs";
|
|
5
|
+
import "../PostgresKyselyMigrator-ChIpZFYB.mjs";
|
|
6
|
+
import "../VitestTransactionIsolator-kFL36T8x.mjs";
|
|
7
|
+
import "../VitestKyselyTransactionIsolator-AfxPJEwR.mjs";
|
|
8
|
+
import { createKyselyDb } from "../helpers-CKMlwSYT.mjs";
|
|
9
|
+
import { wrapVitestKyselyTransaction } from "../kysely-CqfoKVXs.mjs";
|
|
10
|
+
import { TEST_DATABASE_CONFIG, createTestTables } from "../helpers-CukcFAU9.mjs";
|
|
11
11
|
import { beforeAll, describe, expect, it } from "vitest";
|
|
12
12
|
|
|
13
13
|
//#region src/__tests__/integration.spec.ts
|
package/dist/example.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
require('./Factory-
|
|
2
|
-
require('./faker-
|
|
3
|
-
const require_KyselyFactory = require('./KyselyFactory-
|
|
1
|
+
require('./Factory-WMhTNZ9S.cjs');
|
|
2
|
+
require('./faker-SMN4ira4.cjs');
|
|
3
|
+
const require_KyselyFactory = require('./KyselyFactory-Bdq1s1Go.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/example.ts
|
|
6
6
|
const userBuilder = require_KyselyFactory.KyselyFactory.createBuilder({
|
package/dist/example.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./Factory-
|
|
2
|
-
import "./faker-
|
|
3
|
-
import { KyselyFactory } from "./KyselyFactory-
|
|
1
|
+
import "./Factory-z2m01hMj.mjs";
|
|
2
|
+
import "./faker-CxKkEeYi.mjs";
|
|
3
|
+
import { KyselyFactory } from "./KyselyFactory-ELiHgHVv.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/example.ts
|
|
6
6
|
const userBuilder = KyselyFactory.createBuilder({
|