@nu-art/testalot 0.401.1 → 0.401.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/testalot",
3
- "version": "0.401.1",
3
+ "version": "0.401.2",
4
4
  "description": "Testing utilities and test framework helpers for TypeScript projects",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -1,3 +1,4 @@
1
+ // test input type - will have the parameters that actually makes a test case unique, its content depends on the test performed
1
2
  import { runSingleTestCase } from './consts.js';
2
3
  const justAGlobalConst = 'just a global const';
3
4
  // the test cases, notice these can be a resolvable content, in order to keep bind consts between the input and the output,
package/types.d.ts CHANGED
@@ -36,14 +36,14 @@ export type TestCase_Error = {
36
36
  * @template Input - Input type
37
37
  * @template ExpectedResult - Expected result type
38
38
  */
39
- export type TestModel<Input, ExpectedResult> = ResolvableContent<{
39
+ export type TestModel<Input, ExpectedResult> = {
40
40
  description?: ResolvableContent<string, [TestModel<Input, ExpectedResult>]>;
41
41
  input: Input;
42
42
  } & ({
43
43
  result: ExpectedResult | ((result: ExpectedResult) => Promise<any>);
44
44
  } | {
45
45
  error: TestCase_Error;
46
- })>;
46
+ });
47
47
  /**
48
48
  * Function that processes a test case.
49
49
  *
@@ -51,26 +51,3 @@ export type TestModel<Input, ExpectedResult> = ResolvableContent<{
51
51
  * @template ExpectedResult - Expected result type
52
52
  */
53
53
  export type TestProcessor<Input, ExpectedResult> = (input: TestModel<Input, ExpectedResult>) => void | Promise<void>;
54
- /**
55
- * Test suite configuration.
56
- *
57
- * Defines a collection of test cases with setup/teardown hooks.
58
- *
59
- * @template Input - Input type for test cases
60
- * @template ExpectedResult - Expected result type
61
- * @deprecated
62
- */
63
- export type TestSuite<Input, ExpectedResult> = {
64
- /** Optional setup function (runs before all tests) */
65
- before?: () => (void | Promise<void>);
66
- /** Function that processes each test case */
67
- processor: TestProcessor<Input, ExpectedResult>;
68
- /** Optional teardown function (runs after all tests) */
69
- after?: () => (void | Promise<void>);
70
- /** Array of test cases */
71
- testcases: TestModel<Input, ExpectedResult>[];
72
- /** Suite label/name */
73
- label: string;
74
- /** Optional timeout in milliseconds (default: 5000) */
75
- timeout?: number;
76
- };