@geekmidas/testkit 0.0.4 → 0.0.6
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.mjs +1 -1
- package/dist/{KyselyFactory-BGvSMLtd.cjs → KyselyFactory-BX7Kv2uP.cjs} +1 -1
- package/dist/{KyselyFactory-ionH4gvk.mjs → KyselyFactory-pOMOFQWE.mjs} +2 -2
- package/dist/KyselyFactory.cjs +2 -2
- package/dist/KyselyFactory.mjs +3 -3
- package/dist/{ObjectionFactory-CFrtXe7i.mjs → ObjectionFactory-ChuX8sZN.mjs} +1 -1
- package/dist/ObjectionFactory.mjs +2 -2
- package/dist/{PostgresKyselyMigrator-CbtiZgfI.mjs → PostgresKyselyMigrator-D8fm35-s.mjs} +1 -1
- package/dist/{PostgresKyselyMigrator-Cxf2Dp9y.cjs → PostgresKyselyMigrator-JTY2LfwD.cjs} +2 -2
- package/dist/PostgresKyselyMigrator.cjs +2 -2
- package/dist/PostgresKyselyMigrator.mjs +2 -2
- package/dist/{PostgresMigrator-eqyAFSf-.cjs → PostgresMigrator-Bz-tnjB6.cjs} +1 -1
- package/dist/PostgresMigrator.cjs +1 -1
- package/dist/PostgresMigrator.mjs +1 -1
- package/dist/{VitestKyselyTransactionIsolator-DXjWQtDN.mjs → VitestKyselyTransactionIsolator-D-qpeVKO.mjs} +1 -1
- package/dist/{VitestKyselyTransactionIsolator-Dh2AgJDd.cjs → VitestKyselyTransactionIsolator-jF6Ohyu_.cjs} +1 -1
- package/dist/VitestKyselyTransactionIsolator.cjs +2 -3
- package/dist/VitestKyselyTransactionIsolator.mjs +2 -3
- package/dist/{VitestTransactionIsolator-zK5NJ7DQ.cjs → VitestTransactionIsolator-BK9UsrKt.cjs} +4 -2
- package/dist/{VitestTransactionIsolator-pLwsDo_A.mjs → VitestTransactionIsolator-e-R3p_X8.mjs} +4 -3
- package/dist/VitestTransactionIsolator.cjs +1 -2
- package/dist/VitestTransactionIsolator.mjs +1 -2
- package/dist/__tests__/Factory.spec.cjs +42 -42
- package/dist/__tests__/Factory.spec.mjs +23 -24
- package/dist/__tests__/KyselyFactory.spec.cjs +80 -80
- package/dist/__tests__/KyselyFactory.spec.mjs +74 -74
- package/dist/__tests__/ObjectionFactory.spec.cjs +80 -81
- package/dist/__tests__/ObjectionFactory.spec.mjs +52 -53
- package/dist/__tests__/PostgresMigrator.spec.cjs +59 -60
- package/dist/__tests__/PostgresMigrator.spec.mjs +31 -32
- package/dist/__tests__/faker.spec.cjs +60 -60
- package/dist/__tests__/faker.spec.mjs +35 -36
- package/dist/__tests__/integration.spec.cjs +44 -41
- package/dist/__tests__/integration.spec.mjs +45 -43
- package/dist/{chunk-DWy1uDak.cjs → chunk-CUT6urMc.cjs} +0 -9
- package/dist/example.cjs +2 -2
- package/dist/example.mjs +3 -3
- package/dist/{faker-h6CkRloU.cjs → faker-caz-8zt8.cjs} +1 -1
- package/dist/faker.cjs +1 -1
- package/dist/faker.mjs +1 -1
- package/dist/{helpers-C2NH7xcz.cjs → helpers-B2CfbaTC.cjs} +1 -1
- package/dist/helpers-DN4sJO4i.mjs +13 -0
- package/dist/helpers-DOtYCEvZ.cjs +19 -0
- package/dist/helpers.cjs +2 -6
- package/dist/helpers.mjs +2 -5
- package/dist/kysely-C1-aHdnU.mjs +11 -0
- package/dist/kysely-DL3C2eM4.cjs +16 -0
- package/dist/kysely.cjs +8 -15
- package/dist/kysely.mjs +8 -15
- package/dist/objection.mjs +2 -2
- package/package.json +2 -1
- package/src/VitestTransactionIsolator.ts +4 -2
- package/src/__tests__/KyselyFactory.spec.ts +4 -6
- package/src/__tests__/integration.spec.ts +8 -3
- package/src/helpers.ts +1 -18
- package/src/kysely.ts +3 -1
- package/dist/dist-BM2KvLG1.mjs +0 -5618
- package/dist/dist-DE3gAxQI.cjs +0 -5736
- package/dist/helpers-BnARb5Ap.mjs +0 -19
- package/dist/helpers-C_RZk04R.cjs +0 -31
- package/dist/magic-string.es-C6yzoryu.mjs +0 -1014
- package/dist/magic-string.es-jdtJrR0A.cjs +0 -1015
- package/dist/vi.bdSIJ99Y-BgRxGeO2.mjs +0 -9382
- package/dist/vi.bdSIJ99Y-CFuzUeY6.cjs +0 -9393
- /package/dist/{Factory-D52Lsc6Z.mjs → Factory-DlzMkMzb.mjs} +0 -0
- /package/dist/{PostgresMigrator-DqeuPy-e.mjs → PostgresMigrator-CEoRKTdq.mjs} +0 -0
- /package/dist/{faker-cGCFcrj2.mjs → faker-BwaXA_RF.mjs} +0 -0
- /package/dist/{helpers-CukcFAU9.mjs → helpers-Rf5F71r9.mjs} +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IsolationLevel } from "./VitestTransactionIsolator-pLwsDo_A.mjs";
|
|
2
|
-
import { VitestKyselyTransactionIsolator } from "./VitestKyselyTransactionIsolator-DXjWQtDN.mjs";
|
|
3
|
-
import { CamelCasePlugin, Kysely, PostgresDialect } from "kysely";
|
|
4
|
-
import pg from "pg";
|
|
5
|
-
|
|
6
|
-
//#region src/helpers.ts
|
|
7
|
-
function wrapVitestKyselyTransaction(db, setup, level = IsolationLevel.REPEATABLE_READ) {
|
|
8
|
-
const wrapper = new VitestKyselyTransactionIsolator();
|
|
9
|
-
return wrapper.wrapVitestWithTransaction(db, setup, level);
|
|
10
|
-
}
|
|
11
|
-
function createKyselyDb(config) {
|
|
12
|
-
return new Kysely({
|
|
13
|
-
dialect: new PostgresDialect({ pool: new pg.Pool(config) }),
|
|
14
|
-
plugins: [new CamelCasePlugin()]
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { createKyselyDb, wrapVitestKyselyTransaction };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
2
|
-
const require_VitestTransactionIsolator = require('./VitestTransactionIsolator-zK5NJ7DQ.cjs');
|
|
3
|
-
const require_VitestKyselyTransactionIsolator = require('./VitestKyselyTransactionIsolator-Dh2AgJDd.cjs');
|
|
4
|
-
const kysely = require_chunk.__toESM(require("kysely"));
|
|
5
|
-
const pg = require_chunk.__toESM(require("pg"));
|
|
6
|
-
|
|
7
|
-
//#region src/helpers.ts
|
|
8
|
-
function wrapVitestKyselyTransaction(db, setup, level = require_VitestTransactionIsolator.IsolationLevel.REPEATABLE_READ) {
|
|
9
|
-
const wrapper = new require_VitestKyselyTransactionIsolator.VitestKyselyTransactionIsolator();
|
|
10
|
-
return wrapper.wrapVitestWithTransaction(db, setup, level);
|
|
11
|
-
}
|
|
12
|
-
function createKyselyDb(config) {
|
|
13
|
-
return new kysely.Kysely({
|
|
14
|
-
dialect: new kysely.PostgresDialect({ pool: new pg.default.Pool(config) }),
|
|
15
|
-
plugins: [new kysely.CamelCasePlugin()]
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
Object.defineProperty(exports, 'createKyselyDb', {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () {
|
|
23
|
-
return createKyselyDb;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(exports, 'wrapVitestKyselyTransaction', {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function () {
|
|
29
|
-
return wrapVitestKyselyTransaction;
|
|
30
|
-
}
|
|
31
|
-
});
|