@ddd-ts-kit/testing 0.11.0 → 0.12.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.
- package/README.md +1 -0
- package/dist/contracts/cache-purger-contract.d.ts +19 -0
- package/dist/contracts/cache-purger-contract.d.ts.map +1 -0
- package/dist/contracts/cache-purger-contract.js +69 -0
- package/dist/contracts/cache-purger-contract.js.map +1 -0
- package/dist/contracts.d.ts +1 -0
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +1 -0
- package/dist/contracts.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -475,6 +475,7 @@ repositoryContract(runner, { ...options, name: 'DrizzleOrderRepository', createR
|
|
|
475
475
|
| `processStoreContract` | any `ProcessStore` of process managers: an instance as saved (JSON state, armed timeouts, end), a version that is not the next one refused with `CONCURRENCY_CONFLICT`, one of two first saves winning, and with `unitOfWork` nothing left by a rolled back save |
|
|
476
476
|
| `jobStoreContract` | any `JobStore` of background jobs: due jobs earliest first and each to one claim, delayed jobs, idempotency keys scoped by tenant (two tenants never share one), the tenant and the subject `find` shows, the lease and its heartbeats, reports heard only from the attempt that holds the job (progress, checkpoint handed to the next attempt, success, retry, dead and revived, release), cancellation of a waiting and of a running job, purge. With `unitOfWork` (over the same context as the store just created), a job added, cancelled or revived in a unit of work that rolls back is left as it was, and one that commits is added, cancelled or revived. The claims ask for a lease of 30 s |
|
|
477
477
|
| `cacheContract` | any `Cache`: round trip of every shape of value, isolation of entries, deletion, time to live |
|
|
478
|
+
| `cachePurgerContract` | any `CachePurger` with its shared cache (`store`, `holds`): a tag purges what it names and nothing else, a kind reaches each element, the tenants stay apart, purging is idempotent |
|
|
478
479
|
| `lockContract` | any `Lock`: one holder at a time also under concurrent requests, release, expiry, a late release ignored, growing fencing token, `waitMs` |
|
|
479
480
|
| `jobSchedulerContract` | any `JobScheduler`: registration and description, a duplicate name and an unreadable schedule refused, `runNow` (also for a disabled job, an unknown name rejected), nothing by time before `start` or after `stop`, no overlap by default, a failing job answered `failed` with its code while the others go on, the execution context of a run |
|
|
480
481
|
| `loggerContract` | any `Logger`: every level with its message and fields of every shape, level and message that no field forges, children that add their fields and nest, fields read at each entry, an entry below the level dropped without reading a field, `isLevelEnabled` answering what is written (for a child too), no throw on a circular field or a getter that throws, at the top of the fields included; an `Error` passed as a field written as its description (`type`, `code` of a `DomainError`, `message`, own `stack`, `cause`, eight errors deep at most), its message replaced when the logger scrubs unless it is a `DomainError`; every entry in the sink once `flush()` resolves, then no throw from a log call or a second flush. `createLogger({ level, fields, scrubMessages })` answers the logger and `lines()`, what its sink received as `{ level, message, fields }`. No capability flag: `InMemoryLogger` takes the same three options and passes the whole suite |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CachePurger } from '@ddd-ts-kit/kernel';
|
|
2
|
+
import type { Awaitable } from './awaitable.js';
|
|
3
|
+
import type { ContractRunner } from './contract-runner.js';
|
|
4
|
+
/** A shared cache with its purger: answers are filed under tags through the cache itself, then purged. */
|
|
5
|
+
export interface CachePurgerUnderContract {
|
|
6
|
+
readonly purger: CachePurger;
|
|
7
|
+
/** Has the cache keep an answer under `key`, filed under `tags`. */
|
|
8
|
+
store(key: string, tags: readonly string[]): Awaitable<void>;
|
|
9
|
+
/** Whether the cache still serves the answer under `key` without asking the application. */
|
|
10
|
+
holds(key: string): Awaitable<boolean>;
|
|
11
|
+
}
|
|
12
|
+
export interface CachePurgerContractOptions {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
/** A cache holding nothing yet, or nothing under the keys of the test; called before each test. */
|
|
15
|
+
createCache(): Awaitable<CachePurgerUnderContract>;
|
|
16
|
+
}
|
|
17
|
+
/** What every adapter of the kernel `CachePurger` port guarantees, the in-memory one included. */
|
|
18
|
+
export declare function cachePurgerContract(runner: ContractRunner, options: CachePurgerContractOptions): void;
|
|
19
|
+
//# sourceMappingURL=cache-purger-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-purger-contract.d.ts","sourceRoot":"","sources":["../../src/contracts/cache-purger-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,0GAA0G;AAC1G,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,oEAAoE;IACpE,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC7D,4FAA4F;IAC5F,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mGAAmG;IACnG,WAAW,IAAI,SAAS,CAAC,wBAAwB,CAAC,CAAC;CACpD;AAED,kGAAkG;AAClG,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,0BAA0B,GAAG,IAAI,CAErG"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { cacheTag, tenantCacheTags } from '@ddd-ts-kit/kernel';
|
|
2
|
+
import { ContractSuite } from './contract-suite.js';
|
|
3
|
+
/** What every adapter of the kernel `CachePurger` port guarantees, the in-memory one included. */
|
|
4
|
+
export function cachePurgerContract(runner, options) {
|
|
5
|
+
new CachePurgerSuite(runner, options).describe(`${options.name} (cache purger contract)`);
|
|
6
|
+
}
|
|
7
|
+
const MONDAY = cacheTag('calendar', 'c-1');
|
|
8
|
+
const TUESDAY = cacheTag('calendar', 'c-2');
|
|
9
|
+
const EVERY_CALENDAR = cacheTag('calendar');
|
|
10
|
+
class CachePurgerSuite extends ContractSuite {
|
|
11
|
+
constructor(runner, options) {
|
|
12
|
+
super(runner, () => options.createCache());
|
|
13
|
+
}
|
|
14
|
+
tests() {
|
|
15
|
+
this.purgesWhatATagNames();
|
|
16
|
+
this.keepsWhatItDoesNotName();
|
|
17
|
+
this.isIdempotent();
|
|
18
|
+
}
|
|
19
|
+
purgesWhatATagNames() {
|
|
20
|
+
this.it('purges the answers filed under a tag, and only those', async () => {
|
|
21
|
+
await this.subject.store('/calendars/c-1', [MONDAY, EVERY_CALENDAR]);
|
|
22
|
+
await this.subject.store('/calendars/c-2', [TUESDAY, EVERY_CALENDAR]);
|
|
23
|
+
await this.subject.purger.purge([MONDAY]);
|
|
24
|
+
this.expect(await this.subject.holds('/calendars/c-1')).toBe(false);
|
|
25
|
+
this.expect(await this.subject.holds('/calendars/c-2')).toBe(true);
|
|
26
|
+
});
|
|
27
|
+
this.it('purges the answers filed under any of several tags, a kind reaching each of its elements', async () => {
|
|
28
|
+
await this.subject.store('/calendars/c-1', [MONDAY, EVERY_CALENDAR]);
|
|
29
|
+
await this.subject.store('/calendars/c-2', [TUESDAY, EVERY_CALENDAR]);
|
|
30
|
+
await this.subject.store('/calendars', [EVERY_CALENDAR]);
|
|
31
|
+
await this.subject.purger.purge([EVERY_CALENDAR]);
|
|
32
|
+
this.expect(await this.subject.holds('/calendars/c-1')).toBe(false);
|
|
33
|
+
this.expect(await this.subject.holds('/calendars/c-2')).toBe(false);
|
|
34
|
+
this.expect(await this.subject.holds('/calendars')).toBe(false);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
keepsWhatItDoesNotName() {
|
|
38
|
+
this.it('purges a tag written with the characters of a pattern, and nothing the pattern would match', async () => {
|
|
39
|
+
const written = cacheTag('calendar', 'c.1(a)');
|
|
40
|
+
await this.subject.store('/calendars/written', [written]);
|
|
41
|
+
await this.subject.store('/calendars/matched', [cacheTag('calendar', 'cx1a')]);
|
|
42
|
+
await this.subject.purger.purge([written]);
|
|
43
|
+
this.expect(await this.subject.holds('/calendars/written')).toBe(false);
|
|
44
|
+
this.expect(await this.subject.holds('/calendars/matched')).toBe(true);
|
|
45
|
+
});
|
|
46
|
+
this.it('keeps the answers of another tenant', async () => {
|
|
47
|
+
const [ofAcme = MONDAY, ofGlobex = MONDAY] = [
|
|
48
|
+
...tenantCacheTags([MONDAY], 'acme'),
|
|
49
|
+
...tenantCacheTags([MONDAY], 'globex'),
|
|
50
|
+
];
|
|
51
|
+
await this.subject.store('/acme/calendars/c-1', [ofAcme]);
|
|
52
|
+
await this.subject.store('/globex/calendars/c-1', [ofGlobex]);
|
|
53
|
+
await this.subject.purger.purge([ofAcme]);
|
|
54
|
+
this.expect(await this.subject.holds('/acme/calendars/c-1')).toBe(false);
|
|
55
|
+
this.expect(await this.subject.holds('/globex/calendars/c-1')).toBe(true);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
isIdempotent() {
|
|
59
|
+
this.it('purges nothing for a tag nothing is filed under, an empty list, or a second time', async () => {
|
|
60
|
+
await this.subject.store('/calendars/c-2', [TUESDAY]);
|
|
61
|
+
await this.subject.purger.purge([cacheTag('calendar', 'unknown')]);
|
|
62
|
+
await this.subject.purger.purge([]);
|
|
63
|
+
await this.subject.purger.purge([MONDAY]);
|
|
64
|
+
await this.subject.purger.purge([MONDAY]);
|
|
65
|
+
this.expect(await this.subject.holds('/calendars/c-2')).toBe(true);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=cache-purger-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-purger-contract.js","sourceRoot":"","sources":["../../src/contracts/cache-purger-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAoB,MAAM,oBAAoB,CAAC;AAGjF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAiBpD,kGAAkG;AAClG,MAAM,UAAU,mBAAmB,CAAC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AAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,YAAY;QAClB,IAAI,CAAC,EAAE,CAAC,kFAAkF,EAAE,KAAK,IAAI,EAAE;YACrG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;YAEtD,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;YACnE,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YAC1C,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YAE1C,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/contracts.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { Awaitable } from './contracts/awaitable.js';
|
|
2
2
|
export { cacheContract, type CacheContractOptions } from './contracts/cache-contract.js';
|
|
3
|
+
export { cachePurgerContract, type CachePurgerContractOptions, type CachePurgerUnderContract, } from './contracts/cache-purger-contract.js';
|
|
3
4
|
export type { ContractRunner } from './contracts/contract-runner.js';
|
|
4
5
|
export { ContractSuite } from './contracts/contract-suite.js';
|
|
5
6
|
export { criteriaContract, type CriteriaContractOptions, type ReadModelUnderContract, } from './contracts/criteria-contract.js';
|
package/dist/contracts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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7G,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,KAAK,8BAA8B,GACpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC1G,YAAY,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC"}
|
package/dist/contracts.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { cacheContract } from './contracts/cache-contract.js';
|
|
2
|
+
export { cachePurgerContract, } from './contracts/cache-purger-contract.js';
|
|
2
3
|
export { ContractSuite } from './contracts/contract-suite.js';
|
|
3
4
|
export { criteriaContract, } from './contracts/criteria-contract.js';
|
|
4
5
|
export { criteriaContractDefinition } from './contracts/criteria/criteria-contract-definition.js';
|
package/dist/contracts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAA6B,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAA6B,MAAM,+BAA+B,CAAC;AACzF,OAAO,EACL,mBAAmB,GAGpB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EACL,gBAAgB,GAGjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAElG,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EACL,gBAAgB,GAGjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAGhF,OAAO,EACL,oBAAoB,GAGrB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAkC,MAAM,qCAAqC,CAAC;AAEzG,OAAO,EACL,4BAA4B,GAE7B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAgC,MAAM,mCAAmC,CAAC;AAEnG,OAAO,EAAE,YAAY,EAA4B,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,cAAc,EAA8B,MAAM,gCAAgC,CAAC;AAK5F,OAAO,EACL,mBAAmB,GAGpB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,oBAAoB,GAGrB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,2BAA2B,GAE5B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAmC,MAAM,sCAAsC,CAAC;AAC5G,OAAO,EAAE,sBAAsB,EAAsC,MAAM,0CAA0C,CAAC;AAEtH,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAkC,MAAM,oCAAoC,CAAC;AACxG,OAAO,EACL,uBAAuB,GAExB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAkC,MAAM,sCAAsC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddd-ts-kit/testing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Readable tests without mocks: test data builders, given/when/then scenarios and contract suites shared by fakes and real adapters.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"dist"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@ddd-ts-kit/kernel": "0.
|
|
49
|
+
"@ddd-ts-kit/kernel": "0.12.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@ddd-ts-kit/aspects": "0.
|
|
53
|
-
"@ddd-ts-kit/events": "0.
|
|
52
|
+
"@ddd-ts-kit/aspects": "0.12.0",
|
|
53
|
+
"@ddd-ts-kit/events": "0.12.0",
|
|
54
54
|
"@faker-js/faker": "^10.6.0",
|
|
55
|
-
"@ddd-ts-kit/scheduling": "0.
|
|
55
|
+
"@ddd-ts-kit/scheduling": "0.12.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@faker-js/faker": ">=9.0.0"
|