@japa/runner 2.5.0 → 3.0.0-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.
Files changed (54) hide show
  1. package/LICENSE.md +1 -1
  2. package/build/index.d.ts +8 -29
  3. package/build/index.js +95 -458
  4. package/build/src/cli_parser.d.ts +6 -0
  5. package/build/src/cli_parser.d.ts.map +1 -0
  6. package/build/src/cli_parser.js +49 -0
  7. package/build/src/config_manager.d.ts +7 -0
  8. package/build/src/config_manager.d.ts.map +1 -0
  9. package/build/src/config_manager.js +115 -0
  10. package/build/src/create_test.d.ts +16 -0
  11. package/build/src/create_test.d.ts.map +1 -0
  12. package/build/src/create_test.js +33 -0
  13. package/build/src/debug.d.ts +4 -0
  14. package/build/src/debug.d.ts.map +1 -0
  15. package/build/src/debug.js +2 -0
  16. package/build/src/exceptions_manager.d.ts +7 -0
  17. package/build/src/exceptions_manager.d.ts.map +1 -0
  18. package/build/src/exceptions_manager.js +58 -0
  19. package/build/src/files_manager.d.ts +7 -0
  20. package/build/src/files_manager.d.ts.map +1 -0
  21. package/build/src/files_manager.js +28 -0
  22. package/build/src/helpers.d.ts +23 -0
  23. package/build/src/helpers.d.ts.map +1 -0
  24. package/build/src/helpers.js +2 -0
  25. package/build/src/hooks.d.ts +9 -0
  26. package/build/src/hooks.d.ts.map +1 -0
  27. package/build/src/hooks.js +26 -0
  28. package/build/src/planner.d.ts +18 -0
  29. package/build/src/planner.d.ts.map +1 -0
  30. package/build/src/planner.js +67 -0
  31. package/build/src/plugins/retry.d.ts +8 -0
  32. package/build/src/plugins/retry.d.ts.map +1 -0
  33. package/build/src/plugins/retry.js +42 -0
  34. package/build/src/reporters/dot.d.ts +7 -0
  35. package/build/src/reporters/dot.d.ts.map +1 -0
  36. package/build/src/reporters/dot.js +24 -0
  37. package/build/src/reporters/main.d.ts +5 -0
  38. package/build/src/reporters/main.d.ts.map +1 -0
  39. package/build/src/reporters/main.js +21 -0
  40. package/build/src/reporters/ndjson.d.ts +12 -0
  41. package/build/src/reporters/ndjson.d.ts.map +1 -0
  42. package/build/src/reporters/ndjson.js +61 -0
  43. package/build/src/reporters/spec.d.ts +11 -0
  44. package/build/src/reporters/spec.d.ts.map +1 -0
  45. package/build/src/reporters/spec.js +103 -0
  46. package/build/src/types.d.ts +48 -49
  47. package/build/src/types.d.ts.map +1 -0
  48. package/build/src/types.js +1 -10
  49. package/build/src/validator.d.ts +11 -0
  50. package/build/src/validator.d.ts.map +1 -0
  51. package/build/src/validator.js +46 -0
  52. package/package.json +77 -83
  53. package/build/src/core/main.d.ts +0 -32
  54. package/build/src/core/main.js +0 -65
@@ -1,65 +0,0 @@
1
- "use strict";
2
- /*
3
- * @japa/runner
4
- *
5
- * (c) Japa.dev
6
- *
7
- * For the full copyright and license information, please view the LICENSE
8
- * file that was distributed with this source code.
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.Runner = exports.Suite = exports.Group = exports.Test = exports.TestContext = void 0;
12
- const core_1 = require("@japa/core");
13
- class TestContext extends core_1.TestContext {
14
- /**
15
- * Register a function to get notified when an instance of test
16
- * context is created. The callback must be synchronous
17
- */
18
- static created(callback) {
19
- this.createdCallbacks.push(callback);
20
- return this;
21
- }
22
- constructor(test) {
23
- super();
24
- this.test = test;
25
- this.cleanup = (handler) => {
26
- test.cleanup(handler);
27
- };
28
- /**
29
- * Invoke ready callbacks
30
- */
31
- const Constructor = this.constructor;
32
- Constructor.createdCallbacks.forEach((callback) => callback(this));
33
- }
34
- }
35
- exports.TestContext = TestContext;
36
- /**
37
- * Methods to call after the test context instance
38
- * is created
39
- */
40
- TestContext.createdCallbacks = [];
41
- class Test extends core_1.Test {
42
- }
43
- exports.Test = Test;
44
- Test.disposeCallbacks = [];
45
- class Group extends core_1.Group {
46
- }
47
- exports.Group = Group;
48
- class Suite extends core_1.Suite {
49
- onGroup(callback) {
50
- super.onGroup(callback);
51
- return this;
52
- }
53
- onTest(callback) {
54
- super.onTest(callback);
55
- return this;
56
- }
57
- }
58
- exports.Suite = Suite;
59
- class Runner extends core_1.Runner {
60
- onSuite(callback) {
61
- super.onSuite(callback);
62
- return this;
63
- }
64
- }
65
- exports.Runner = Runner;