@kunk/testing 3.0.11

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.
@@ -0,0 +1,5 @@
1
+ //#region src/index.d.ts
2
+ declare function expectToMatchObject<T>(from: T, toMatch: Partial<T>): void;
3
+ declare function CLEAR_TEST_DATA(): Promise<void>;
4
+ //#endregion
5
+ export { CLEAR_TEST_DATA, expectToMatchObject };
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ import{afterAll,afterEach,expect,mock,setDefaultTimeout,setSystemTime}from"bun:test";import{PostgresContainer}from"@kunk/docker";import{DatabaseConfig}from"@kunk/server";setSystemTime(new Date(`2025-03-01T09:00:00.000Z`)),setDefaultTimeout(1e4);const db=await PostgresContainer.start();DatabaseConfig.set({uri:`postgresql://app_user:${db.password}@${db.hostname}:${db.port}/${db.database}`,maxPoolSize:3,idleTimeout:5,connectionTimeout:30}),afterAll(async()=>{await db.stop()}),afterEach(async()=>{mock.clearAllMocks(),mock.restore()});function expectToMatchObject(e,t){return expect(e).toMatchObject(t)}async function CLEAR_TEST_DATA(){await db.clear()}export{CLEAR_TEST_DATA,expectToMatchObject};
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@kunk/testing",
3
+ "version": "3.0.11",
4
+ "private": false,
5
+ "type": "module",
6
+ "main": "./src/index.ts",
7
+ "module": "./src/index.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "tsdown",
13
+ "version:patch": "bun pm version patch",
14
+ "deploy": "bun publish"
15
+ },
16
+ "dependencies": {
17
+ "@kunk/api": "3.0.10",
18
+ "@kunk/database": "3.0.10",
19
+ "@kunk/server": "3.0.10",
20
+ "@kunk/model": "3.0.10",
21
+ "@kunk/docker": "3.0.10"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public",
25
+ "main": "./dist/index.mjs",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.mts",
29
+ "import": "./dist/index.mjs",
30
+ "default": "./dist/index.mjs"
31
+ }
32
+ }
33
+ }
34
+ }