@feasibleone/blong-gogo 1.23.0 → 1.24.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.24.0](https://github.com/feasibleone/blong/compare/blong-gogo-v1.23.0...blong-gogo-v1.24.0) (2026-05-15)
4
+
5
+
6
+ ### Features
7
+
8
+ * snapshot testing ([ffae636](https://github.com/feasibleone/blong/commit/ffae6360d9f6a04b42e733fc6be291e1cd707bfa))
9
+
3
10
  ## [1.23.0](https://github.com/feasibleone/blong/compare/blong-gogo-v1.22.0...blong-gogo-v1.23.0) (2026-05-14)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feasibleone/blong-gogo",
3
- "version": "1.23.0",
3
+ "version": "1.24.0",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/feasibleone/blong.git"
6
6
  },
package/src/Registry.ts CHANGED
@@ -328,12 +328,32 @@ export default class Registry extends Internal implements IRegistry {
328
328
  assert: attachCheckpoint ? nodeAssert : undefined,
329
329
  rename: (object: object, value: string) =>
330
330
  Object.defineProperty<unknown>(object, 'name', {value}),
331
- group: (name: string) => (steps: unknown[]) =>
332
- Object.defineProperty(steps, 'name', {
333
- value: name,
334
- enumerable: false,
335
- writable: true,
336
- }),
331
+ group:
332
+ (name: string, config?: {autoSnapshot?: boolean; mask?: string[]}) =>
333
+ (steps: unknown[]) => {
334
+ Object.defineProperty(steps, 'name', {
335
+ value: name,
336
+ enumerable: false,
337
+ writable: true,
338
+ });
339
+ if (config?.autoSnapshot !== undefined)
340
+ Object.defineProperty(steps, 'autoSnapshot', {
341
+ value: config.autoSnapshot,
342
+ enumerable: false,
343
+ writable: true,
344
+ });
345
+ if (config?.mask !== undefined)
346
+ Object.defineProperty(steps, 'mask', {
347
+ value: config.mask,
348
+ enumerable: false,
349
+ writable: true,
350
+ });
351
+ return steps;
352
+ },
353
+ checkpoint: (name: string, ...markers: string[]) => {
354
+ const arr: string[] = markers.length > 0 ? [...markers] : ['*'];
355
+ return Object.assign(arr, {name});
356
+ },
337
357
  timing: this.#platform.timing,
338
358
  setProperty(obj: Record<string, unknown>, path: string, value: unknown): void {
339
359
  if (!path) return;
package/src/chain.ts CHANGED
@@ -2,7 +2,11 @@ import {TestExecutor, type ITestLogger} from '@feasibleone/blong-chain';
2
2
  import assert from 'node:assert';
3
3
 
4
4
  type Step = (a: typeof assert, results: object) => object | Promise<object>;
5
- type Steps = (Promise<(Step | Step[]) & {name: string}>[] | Step[]) & {name: string};
5
+ type Steps = (Promise<(Step | Step[]) & {name: string}>[] | Step[]) & {
6
+ name: string;
7
+ autoSnapshot?: boolean;
8
+ mask?: string[];
9
+ };
6
10
  interface ITestContext {
7
11
  test: (name: string, fn: (t: unknown) => void | Promise<void>) => unknown;
8
12
  }
@@ -15,7 +19,12 @@ const runSteps =
15
19
  ): ((t: ITestContext) => Promise<void>) =>
16
20
  async (t: ITestContext) => {
17
21
  // Use new parallel TestExecutor for improved performance
18
- const executor = new TestExecutor({concurrency: 10, log});
22
+ const executor = new TestExecutor({
23
+ concurrency: 10,
24
+ log,
25
+ autoSnapshot: (steps as Steps).autoSnapshot,
26
+ mask: (steps as Steps).mask,
27
+ });
19
28
 
20
29
  // Resolve any promises in steps array
21
30
  const resolvedSteps: (Step | Step[])[] = [];