@noldova/context.testing 0.0.0-stage → 0.0.1

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 (132) hide show
  1. package/LICENSE +21 -0
  2. package/api/index.d.ts +2015 -0
  3. package/api/index.js +42 -0
  4. package/api/index.js.map +1 -0
  5. package/decorators/category.js +23 -0
  6. package/decorators/category.js.map +1 -0
  7. package/decorators/skip.js +17 -0
  8. package/decorators/skip.js.map +1 -0
  9. package/decorators/test-class.js +12 -0
  10. package/decorators/test-class.js.map +1 -0
  11. package/decorators/test-data.js +23 -0
  12. package/decorators/test-data.js.map +1 -0
  13. package/decorators/test-method.js +12 -0
  14. package/decorators/test-method.js.map +1 -0
  15. package/enums/test-outcome.js +14 -0
  16. package/enums/test-outcome.js.map +1 -0
  17. package/enums/test-worker-message-kind.js +17 -0
  18. package/enums/test-worker-message-kind.js.map +1 -0
  19. package/enums/test-worker-value-kind.js +16 -0
  20. package/enums/test-worker-value-kind.js.map +1 -0
  21. package/exceptions/assert-failed.exception.js +19 -0
  22. package/exceptions/assert-failed.exception.js.map +1 -0
  23. package/exceptions/test-timeout.exception.js +20 -0
  24. package/exceptions/test-timeout.exception.js.map +1 -0
  25. package/exceptions/testing.exception.js +14 -0
  26. package/exceptions/testing.exception.js.map +1 -0
  27. package/interfaces/i-clock.js +9 -0
  28. package/interfaces/i-clock.js.map +1 -0
  29. package/interfaces/i-coverage-range.js +9 -0
  30. package/interfaces/i-coverage-range.js.map +1 -0
  31. package/interfaces/i-coverage-report.js +9 -0
  32. package/interfaces/i-coverage-report.js.map +1 -0
  33. package/interfaces/i-function-coverage.js +9 -0
  34. package/interfaces/i-function-coverage.js.map +1 -0
  35. package/interfaces/i-script-coverage.js +9 -0
  36. package/interfaces/i-script-coverage.js.map +1 -0
  37. package/interfaces/i-source-map-data.js +9 -0
  38. package/interfaces/i-source-map-data.js.map +1 -0
  39. package/interfaces/i-test-progress-listener.js +9 -0
  40. package/interfaces/i-test-progress-listener.js.map +1 -0
  41. package/models/coverage/block-coverage.js +21 -0
  42. package/models/coverage/block-coverage.js.map +1 -0
  43. package/models/coverage/coverage-project.js +23 -0
  44. package/models/coverage/coverage-project.js.map +1 -0
  45. package/models/coverage/coverage-range.js +18 -0
  46. package/models/coverage/coverage-range.js.map +1 -0
  47. package/models/coverage/coverage-result.js +28 -0
  48. package/models/coverage/coverage-result.js.map +1 -0
  49. package/models/coverage/file-coverage.js +45 -0
  50. package/models/coverage/file-coverage.js.map +1 -0
  51. package/models/coverage/function-coverage.js +14 -0
  52. package/models/coverage/function-coverage.js.map +1 -0
  53. package/models/coverage/line-range.js +25 -0
  54. package/models/coverage/line-range.js.map +1 -0
  55. package/models/coverage/mapped-source-line.js +22 -0
  56. package/models/coverage/mapped-source-line.js.map +1 -0
  57. package/models/coverage/source-map-segment.js +18 -0
  58. package/models/coverage/source-map-segment.js.map +1 -0
  59. package/models/decorators/test-data-entry.js +17 -0
  60. package/models/decorators/test-data-entry.js.map +1 -0
  61. package/models/decorators/test-marks.js +16 -0
  62. package/models/decorators/test-marks.js.map +1 -0
  63. package/models/discovery/discovered-test-class.js +36 -0
  64. package/models/discovery/discovered-test-class.js.map +1 -0
  65. package/models/discovery/discovered-test-method.js +42 -0
  66. package/models/discovery/discovered-test-method.js.map +1 -0
  67. package/models/discovery/test-project.js +20 -0
  68. package/models/discovery/test-project.js.map +1 -0
  69. package/models/execution/test-worker-message.js +76 -0
  70. package/models/execution/test-worker-message.js.map +1 -0
  71. package/models/execution/test-worker-record.js +75 -0
  72. package/models/execution/test-worker-record.js.map +1 -0
  73. package/models/execution/test-worker-result.js +45 -0
  74. package/models/execution/test-worker-result.js.map +1 -0
  75. package/models/execution/test-worker-run.js +31 -0
  76. package/models/execution/test-worker-run.js.map +1 -0
  77. package/models/execution/test-worker-start.js +33 -0
  78. package/models/execution/test-worker-start.js.map +1 -0
  79. package/models/execution/test-worker-text.js +17 -0
  80. package/models/execution/test-worker-text.js.map +1 -0
  81. package/models/execution/test-worker-value.js +104 -0
  82. package/models/execution/test-worker-value.js.map +1 -0
  83. package/models/reporting/coverage-report-row.js +22 -0
  84. package/models/reporting/coverage-report-row.js.map +1 -0
  85. package/models/results/test-class-result.js +29 -0
  86. package/models/results/test-class-result.js.map +1 -0
  87. package/models/results/test-method-result.js +59 -0
  88. package/models/results/test-method-result.js.map +1 -0
  89. package/models/results/test-run-result.js +34 -0
  90. package/models/results/test-run-result.js.map +1 -0
  91. package/models/results/test-run-totals.js +36 -0
  92. package/models/results/test-run-totals.js.map +1 -0
  93. package/models/results/test-selection.js +33 -0
  94. package/models/results/test-selection.js.map +1 -0
  95. package/package.json +25 -4
  96. package/resources.js +309 -0
  97. package/resources.js.map +1 -0
  98. package/services/assert.js +92 -0
  99. package/services/assert.js.map +1 -0
  100. package/services/coverage/coverage-analyzer.js +52 -0
  101. package/services/coverage/coverage-analyzer.js.map +1 -0
  102. package/services/coverage/coverage-report.reader.js +126 -0
  103. package/services/coverage/coverage-report.reader.js.map +1 -0
  104. package/services/coverage/file-coverage-analyzer.js +206 -0
  105. package/services/coverage/file-coverage-analyzer.js.map +1 -0
  106. package/services/coverage/source-map.js +135 -0
  107. package/services/coverage/source-map.js.map +1 -0
  108. package/services/discovery/test-discovery.js +198 -0
  109. package/services/discovery/test-discovery.js.map +1 -0
  110. package/services/execution/parallel-test-runner.js +24 -0
  111. package/services/execution/parallel-test-runner.js.map +1 -0
  112. package/services/execution/test-executor.js +116 -0
  113. package/services/execution/test-executor.js.map +1 -0
  114. package/services/execution/test-run-entry-point.js +89 -0
  115. package/services/execution/test-run-entry-point.js.map +1 -0
  116. package/services/execution/test-run-supervisor.js +251 -0
  117. package/services/execution/test-run-supervisor.js.map +1 -0
  118. package/services/execution/test-run-worker-entry-point.js +18 -0
  119. package/services/execution/test-run-worker-entry-point.js.map +1 -0
  120. package/services/execution/test-run-worker.js +116 -0
  121. package/services/execution/test-run-worker.js.map +1 -0
  122. package/services/execution/test-runner.js +58 -0
  123. package/services/execution/test-runner.js.map +1 -0
  124. package/services/reporting/coverage-report-writer.js +81 -0
  125. package/services/reporting/coverage-report-writer.js.map +1 -0
  126. package/services/reporting/test-console-reporter.js +72 -0
  127. package/services/reporting/test-console-reporter.js.map +1 -0
  128. package/services/reporting/test-report-writer.js +111 -0
  129. package/services/reporting/test-report-writer.js.map +1 -0
  130. package/services/timing/system-clock.js +26 -0
  131. package/services/timing/system-clock.js.map +1 -0
  132. package/README.md +0 -3
package/api/index.js ADDED
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import "@noldova/context.core";
9
+ export { Category } from "../decorators/category.js";
10
+ export { Skip } from "../decorators/skip.js";
11
+ export { TestClass } from "../decorators/test-class.js";
12
+ export { TestData } from "../decorators/test-data.js";
13
+ export { TestMethod } from "../decorators/test-method.js";
14
+ export { TestOutcome } from "../enums/test-outcome.js";
15
+ export { AssertFailedException } from "../exceptions/assert-failed.exception.js";
16
+ export { TestTimeoutException } from "../exceptions/test-timeout.exception.js";
17
+ export { TestingException } from "../exceptions/testing.exception.js";
18
+ export { BlockCoverage } from "../models/coverage/block-coverage.js";
19
+ export { CoverageProject } from "../models/coverage/coverage-project.js";
20
+ export { CoverageResult } from "../models/coverage/coverage-result.js";
21
+ export { FileCoverage } from "../models/coverage/file-coverage.js";
22
+ export { LineRange } from "../models/coverage/line-range.js";
23
+ export { MappedSourceLine } from "../models/coverage/mapped-source-line.js";
24
+ export { DiscoveredTestClass } from "../models/discovery/discovered-test-class.js";
25
+ export { DiscoveredTestMethod } from "../models/discovery/discovered-test-method.js";
26
+ export { TestProject } from "../models/discovery/test-project.js";
27
+ export { TestClassResult } from "../models/results/test-class-result.js";
28
+ export { TestMethodResult } from "../models/results/test-method-result.js";
29
+ export { TestRunResult } from "../models/results/test-run-result.js";
30
+ export { TestRunTotals } from "../models/results/test-run-totals.js";
31
+ export { TestSelection } from "../models/results/test-selection.js";
32
+ export { Assert } from "../services/assert.js";
33
+ export { CoverageAnalyzer } from "../services/coverage/coverage-analyzer.js";
34
+ export { SourceMap } from "../services/coverage/source-map.js";
35
+ export { TestDiscovery } from "../services/discovery/test-discovery.js";
36
+ export { ParallelTestRunner } from "../services/execution/parallel-test-runner.js";
37
+ export { TestExecutor } from "../services/execution/test-executor.js";
38
+ export { TestRunner } from "../services/execution/test-runner.js";
39
+ export { CoverageReportWriter } from "../services/reporting/coverage-report-writer.js";
40
+ export { TestConsoleReporter } from "../services/reporting/test-console-reporter.js";
41
+ export { TestReportWriter } from "../services/reporting/test-report-writer.js";
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAItE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ArgumentException } from "@noldova/context.exceptions";
9
+ import { TestingException } from "../exceptions/testing.exception.js";
10
+ import { TestMarks } from "../models/decorators/test-marks.js";
11
+ import { Resources } from "../resources.js";
12
+ export function Category(name) {
13
+ ArgumentException.throwIfNullOrWhitespace(name, Resources.nameParameter);
14
+ return (t) => {
15
+ if (!Object.hasOwn(t, TestMarks.CATEGORY))
16
+ Object.defineProperty(t, TestMarks.CATEGORY, { value: [], writable: false, enumerable: false, configurable: false });
17
+ const categories = Object.getOwnPropertyDescriptor(t, TestMarks.CATEGORY)?.value;
18
+ if (!Array.isArray(categories))
19
+ throw new TestingException(Resources.categoryMarkInvalid);
20
+ categories.unshift(name);
21
+ };
22
+ }
23
+ //# sourceMappingURL=category.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/decorators/category.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,iBAAiB,CAAC,uBAAuB,CAAC,IAAI,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IAEzE,OAAO,CAAC,CAAW,EAAQ,EAAE;QAC3B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC;YACvC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;QAEvH,MAAM,UAAU,GAAY,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;QAC1F,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;YAC5B,MAAM,IAAI,gBAAgB,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QAE5D,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ArgumentException } from "@noldova/context.exceptions";
9
+ import { TestMarks } from "../models/decorators/test-marks.js";
10
+ import { Resources } from "../resources.js";
11
+ export function Skip(reason) {
12
+ ArgumentException.throwIfNullOrWhitespace(reason, Resources.reasonParameter);
13
+ return (t) => {
14
+ Object.defineProperty(t, TestMarks.SKIP, { value: reason, writable: false, enumerable: false, configurable: false });
15
+ };
16
+ }
17
+ //# sourceMappingURL=skip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/decorators/skip.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,UAAU,IAAI,CAAC,MAAc;IACjC,iBAAiB,CAAC,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;IAE7E,OAAO,CAAC,CAAW,EAAQ,EAAE;QAC3B,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,SAAS,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;IACvH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { TestMarks } from "../models/decorators/test-marks.js";
9
+ export function TestClass(value) {
10
+ Object.defineProperty(value, TestMarks.TEST_CLASS, { value: true, writable: false, enumerable: false, configurable: false });
11
+ }
12
+ //# sourceMappingURL=test-class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-class.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/decorators/test-class.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAE/D,MAAM,UAAU,SAAS,CAAC,KAAe;IACvC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;AAC/H,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { TestingException } from "../exceptions/testing.exception.js";
9
+ import { TestDataEntry } from "../models/decorators/test-data-entry.js";
10
+ import { TestMarks } from "../models/decorators/test-marks.js";
11
+ import { Resources } from "../resources.js";
12
+ export function TestData(...values) {
13
+ const entry = new TestDataEntry(values);
14
+ return (t) => {
15
+ if (!Object.hasOwn(t, TestMarks.TEST_DATA))
16
+ Object.defineProperty(t, TestMarks.TEST_DATA, { value: [], writable: false, enumerable: false, configurable: false });
17
+ const entries = Object.getOwnPropertyDescriptor(t, TestMarks.TEST_DATA)?.value;
18
+ if (!Array.isArray(entries))
19
+ throw new TestingException(Resources.testDataMarkInvalid);
20
+ entries.unshift(entry);
21
+ };
22
+ }
23
+ //# sourceMappingURL=test-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-data.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/decorators/test-data.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,UAAU,QAAQ,CAA+B,GAAG,MAAkB;IAC1E,MAAM,KAAK,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IAExC,OAAO,CAAC,CAA4C,EAAQ,EAAE;QAC5D,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,SAAS,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;QAExH,MAAM,OAAO,GAAY,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC;QACxF,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;YACzB,MAAM,IAAI,gBAAgB,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QAE5D,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { TestMarks } from "../models/decorators/test-marks.js";
9
+ export function TestMethod(value) {
10
+ Object.defineProperty(value, TestMarks.TEST_METHOD, { value: true, writable: false, enumerable: false, configurable: false });
11
+ }
12
+ //# sourceMappingURL=test-method.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-method.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/decorators/test-method.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAE/D,MAAM,UAAU,UAAU,CAAC,KAAe;IACxC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;AAChI,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export var TestOutcome;
9
+ (function (TestOutcome) {
10
+ TestOutcome["Passed"] = "Passed";
11
+ TestOutcome["Failed"] = "Failed";
12
+ TestOutcome["Skipped"] = "Skipped";
13
+ })(TestOutcome || (TestOutcome = {}));
14
+ //# sourceMappingURL=test-outcome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-outcome.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/enums/test-outcome.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export var TestWorkerMessageKind;
9
+ (function (TestWorkerMessageKind) {
10
+ TestWorkerMessageKind["Imported"] = "Imported";
11
+ TestWorkerMessageKind["Ready"] = "Ready";
12
+ TestWorkerMessageKind["Started"] = "Started";
13
+ TestWorkerMessageKind["MethodCompleted"] = "MethodCompleted";
14
+ TestWorkerMessageKind["TimedOut"] = "TimedOut";
15
+ TestWorkerMessageKind["ClassCompleted"] = "ClassCompleted";
16
+ })(TestWorkerMessageKind || (TestWorkerMessageKind = {}));
17
+ //# sourceMappingURL=test-worker-message-kind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-worker-message-kind.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/enums/test-worker-message-kind.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,4DAAmC,CAAA;IACnC,8CAAqB,CAAA;IACrB,0DAAiC,CAAA;AACnC,CAAC,EAPW,qBAAqB,KAArB,qBAAqB,QAOhC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export var TestWorkerValueKind;
9
+ (function (TestWorkerValueKind) {
10
+ TestWorkerValueKind["Value"] = "Value";
11
+ TestWorkerValueKind["Text"] = "Text";
12
+ TestWorkerValueKind["Error"] = "Error";
13
+ TestWorkerValueKind["Assert"] = "Assert";
14
+ TestWorkerValueKind["Timeout"] = "Timeout";
15
+ })(TestWorkerValueKind || (TestWorkerValueKind = {}));
16
+ //# sourceMappingURL=test-worker-value-kind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-worker-value-kind.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/enums/test-worker-value-kind.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,oCAAa,CAAA;IACb,sCAAe,CAAA;IACf,wCAAiB,CAAA;IACjB,0CAAmB,CAAA;AACrB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Resources } from "../resources.js";
9
+ import { TestingException } from "./testing.exception.js";
10
+ export class AssertFailedException extends TestingException {
11
+ expected;
12
+ actual;
13
+ constructor(message, expected, actual, options) {
14
+ super(message ?? Resources.assertionFailed, options);
15
+ this.expected = expected;
16
+ this.actual = actual;
17
+ }
18
+ }
19
+ //# sourceMappingURL=assert-failed.exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert-failed.exception.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/exceptions/assert-failed.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,OAAO,qBAAsB,SAAQ,gBAAgB;IACzC,QAAQ,CAAU;IAClB,MAAM,CAAU;IAEhC,YAAmB,OAAgB,EAAE,QAAkB,EAAE,MAAgB,EAAE,OAA0B;QACnG,KAAK,CAAC,OAAO,IAAI,SAAS,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;QAErD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { nameof } from "@noldova/context.core";
9
+ import { ArgumentOutOfRangeException } from "@noldova/context.exceptions";
10
+ import { Resources } from "../resources.js";
11
+ import { TestingException } from "./testing.exception.js";
12
+ export class TestTimeoutException extends TestingException {
13
+ timeoutMilliseconds;
14
+ constructor(timeoutMilliseconds, options) {
15
+ super(Resources.testTimedOut, options);
16
+ ArgumentOutOfRangeException.throwIfNotPositiveInteger(timeoutMilliseconds, nameof(t => t.timeoutMilliseconds), Resources.timeoutInvalid);
17
+ this.timeoutMilliseconds = timeoutMilliseconds;
18
+ }
19
+ }
20
+ //# sourceMappingURL=test-timeout.exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-timeout.exception.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/exceptions/test-timeout.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAyB,MAAM,6BAA6B,CAAC;AAEjG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,OAAO,oBAAqB,SAAQ,gBAAgB;IACxC,mBAAmB,CAAS;IAE5C,YAAmB,mBAA2B,EAAE,OAA0B;QACxE,KAAK,CAAC,SAAS,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAEvC,2BAA2B,CAAC,yBAAyB,CAAC,mBAAmB,EAAE,MAAM,CAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;QAC/J,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACjD,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Exception } from "@noldova/context.exceptions";
9
+ export class TestingException extends Exception {
10
+ constructor(message, options) {
11
+ super(message, options);
12
+ }
13
+ }
14
+ //# sourceMappingURL=testing.exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.exception.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/exceptions/testing.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAyB,MAAM,6BAA6B,CAAC;AAE/E,MAAM,OAAO,gBAAiB,SAAQ,SAAS;IAC7C,YAAmB,OAAe,EAAE,OAA0B;QAC5D,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=i-clock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-clock.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/interfaces/i-clock.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=i-coverage-range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-coverage-range.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/interfaces/i-coverage-range.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=i-coverage-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-coverage-report.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/interfaces/i-coverage-report.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=i-function-coverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-function-coverage.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/interfaces/i-function-coverage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=i-script-coverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-script-coverage.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/interfaces/i-script-coverage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=i-source-map-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-source-map-data.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/interfaces/i-source-map-data.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=i-test-progress-listener.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-test-progress-listener.js","sourceRoot":"","sources":["../../../../src/noldova.context.testing/src/interfaces/i-test-progress-listener.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { nameof } from "@noldova/context.core";
9
+ import { ArgumentOutOfRangeException } from "@noldova/context.exceptions";
10
+ import { Resources } from "../../resources.js";
11
+ export class BlockCoverage {
12
+ line;
13
+ isTaken;
14
+ constructor(line, isTaken) {
15
+ if (!Number.isInteger(line) || line < 1)
16
+ throw new ArgumentOutOfRangeException(nameof(t => t.line), line, Resources.lineInvalid);
17
+ this.line = line;
18
+ this.isTaken = isTaken;
19
+ }
20
+ }
21
+ //# sourceMappingURL=block-coverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-coverage.js","sourceRoot":"","sources":["../../../../../src/noldova.context.testing/src/models/coverage/block-coverage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,aAAa;IACR,IAAI,CAAS;IACb,OAAO,CAAU;IAEjC,YAAmB,IAAY,EAAE,OAAgB;QAC/C,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC;YACrC,MAAM,IAAI,2BAA2B,CAAC,MAAM,CAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;QAEzG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { nameof } from "@noldova/context.core";
9
+ import { ArgumentException } from "@noldova/context.exceptions";
10
+ export class CoverageProject {
11
+ name;
12
+ productionDirectory;
13
+ sourceDirectory;
14
+ constructor(name, productionDirectory, sourceDirectory) {
15
+ ArgumentException.throwIfNullOrWhitespace(name, nameof(t => t.name));
16
+ ArgumentException.throwIfNullOrWhitespace(productionDirectory, nameof(t => t.productionDirectory));
17
+ ArgumentException.throwIfNullOrWhitespace(sourceDirectory, nameof(t => t.sourceDirectory));
18
+ this.name = name;
19
+ this.productionDirectory = productionDirectory;
20
+ this.sourceDirectory = sourceDirectory;
21
+ }
22
+ }
23
+ //# sourceMappingURL=coverage-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coverage-project.js","sourceRoot":"","sources":["../../../../../src/noldova.context.testing/src/models/coverage/coverage-project.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,OAAO,eAAe;IACV,IAAI,CAAS;IACb,mBAAmB,CAAS;IAC5B,eAAe,CAAS;IAExC,YAAmB,IAAY,EAAE,mBAA2B,EAAE,eAAuB;QACnF,iBAAiB,CAAC,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACtF,iBAAiB,CAAC,uBAAuB,CAAC,mBAAmB,EAAE,MAAM,CAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC;QACpH,iBAAiB,CAAC,uBAAuB,CAAC,eAAe,EAAE,MAAM,CAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;QAE5G,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class CoverageRange {
9
+ startOffset;
10
+ endOffset;
11
+ count;
12
+ constructor(startOffset, endOffset, count) {
13
+ this.startOffset = startOffset;
14
+ this.endOffset = endOffset;
15
+ this.count = count;
16
+ }
17
+ }
18
+ //# sourceMappingURL=coverage-range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coverage-range.js","sourceRoot":"","sources":["../../../../../src/noldova.context.testing/src/models/coverage/coverage-range.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,aAAa;IACR,WAAW,CAAS;IACpB,SAAS,CAAS;IAClB,KAAK,CAAS;IAE9B,YAAmB,WAAmB,EAAE,SAAiB,EAAE,KAAa;QACtE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class CoverageResult {
9
+ fileCoverages;
10
+ isComplete;
11
+ executableFileCoverages;
12
+ incompleteFileCoverages;
13
+ totalLength;
14
+ uncoveredLength;
15
+ blockCount;
16
+ takenBlockCount;
17
+ constructor(fileCoverages) {
18
+ this.fileCoverages = [...fileCoverages];
19
+ this.executableFileCoverages = this.fileCoverages.filter(t => t.isExecutable);
20
+ this.incompleteFileCoverages = this.executableFileCoverages.filter(t => !t.isFullyCovered);
21
+ this.isComplete = this.incompleteFileCoverages.length === 0;
22
+ this.totalLength = this.fileCoverages.reduce((sum, fileCoverage) => sum + fileCoverage.totalLength, 0);
23
+ this.uncoveredLength = this.fileCoverages.reduce((sum, fileCoverage) => sum + fileCoverage.uncoveredLength, 0);
24
+ this.blockCount = this.fileCoverages.reduce((sum, fileCoverage) => sum + fileCoverage.blockCount, 0);
25
+ this.takenBlockCount = this.fileCoverages.reduce((sum, fileCoverage) => sum + fileCoverage.takenBlockCount, 0);
26
+ }
27
+ }
28
+ //# sourceMappingURL=coverage-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coverage-result.js","sourceRoot":"","sources":["../../../../../src/noldova.context.testing/src/models/coverage/coverage-result.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAO,cAAc;IACT,aAAa,CAA0B;IACvC,UAAU,CAAU;IACpB,uBAAuB,CAA0B;IACjD,uBAAuB,CAA0B;IACjD,WAAW,CAAS;IACpB,eAAe,CAAS;IACxB,UAAU,CAAS;IACnB,eAAe,CAAS;IAExC,YAAmB,aAAsC;QACvD,IAAI,CAAC,aAAa,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC;QACxC,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;QAC9E,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAC3F,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,uBAAuB,CAAC,MAAM,KAAK,CAAC,CAAC;QAC5D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,CAAC,GAAG,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QACvG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,CAAC,GAAG,GAAG,YAAY,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;QAC/G,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,CAAC,GAAG,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACrG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,CAAC,GAAG,GAAG,YAAY,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;IACjH,CAAC;CACF"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { nameof } from "@noldova/context.core";
9
+ import { ArgumentException, ArgumentOutOfRangeException } from "@noldova/context.exceptions";
10
+ import { Resources } from "../../resources.js";
11
+ export class FileCoverage {
12
+ projectName;
13
+ relativePath;
14
+ uncoveredLineRanges;
15
+ totalLength;
16
+ uncoveredLength;
17
+ blockCoverages;
18
+ isFullyCovered;
19
+ isExecutable;
20
+ blockCount;
21
+ takenBlockCount;
22
+ constructor(projectName, relativePath, uncoveredLineRanges, totalLength, uncoveredLength, blockCoverages) {
23
+ ArgumentException.throwIfNullOrWhitespace(projectName, nameof(t => t.projectName));
24
+ ArgumentException.throwIfNullOrWhitespace(relativePath, nameof(t => t.relativePath));
25
+ if (!Number.isInteger(totalLength) || totalLength < 0)
26
+ throw new ArgumentOutOfRangeException(nameof(t => t.totalLength), totalLength, Resources.totalLengthInvalid);
27
+ if (!Number.isInteger(uncoveredLength) || uncoveredLength < 0 || uncoveredLength > totalLength)
28
+ throw new ArgumentOutOfRangeException(nameof(t => t.uncoveredLength), uncoveredLength, Resources.uncoveredLengthInvalid);
29
+ if ((uncoveredLength === 0) !== (uncoveredLineRanges.length === 0))
30
+ throw new ArgumentException(Resources.uncoveredRangesInvalid, nameof(t => t.uncoveredLineRanges));
31
+ if (totalLength === 0 && blockCoverages.length > 0)
32
+ throw new ArgumentException(Resources.nonExecutableBlocksInvalid, nameof(t => t.blockCoverages));
33
+ this.projectName = projectName;
34
+ this.relativePath = relativePath;
35
+ this.uncoveredLineRanges = [...uncoveredLineRanges];
36
+ this.totalLength = totalLength;
37
+ this.uncoveredLength = uncoveredLength;
38
+ this.blockCoverages = [...blockCoverages];
39
+ this.isExecutable = this.totalLength > 0;
40
+ this.isFullyCovered = this.isExecutable && this.uncoveredLineRanges.length === 0;
41
+ this.blockCount = this.blockCoverages.length;
42
+ this.takenBlockCount = this.blockCoverages.filter(t => t.isTaken).length;
43
+ }
44
+ }
45
+ //# sourceMappingURL=file-coverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-coverage.js","sourceRoot":"","sources":["../../../../../src/noldova.context.testing/src/models/coverage/file-coverage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE7F,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,MAAM,OAAO,YAAY;IACP,WAAW,CAAS;IACpB,YAAY,CAAS;IACrB,mBAAmB,CAAuB;IAC1C,WAAW,CAAS;IACpB,eAAe,CAAS;IACxB,cAAc,CAA2B;IACzC,cAAc,CAAU;IACxB,YAAY,CAAU;IACtB,UAAU,CAAS;IACnB,eAAe,CAAS;IAExC,YACE,WAAmB,EACnB,YAAoB,EACpB,mBAAyC,EACzC,WAAmB,EACnB,eAAuB,EACvB,cAAwC;QACxC,iBAAiB,CAAC,uBAAuB,CAAC,WAAW,EAAE,MAAM,CAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QACjG,iBAAiB,CAAC,uBAAuB,CAAC,YAAY,EAAE,MAAM,CAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;QACnG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,WAAW,GAAG,CAAC;YACnD,MAAM,IAAI,2BAA2B,CAAC,MAAM,CAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,SAAS,CAAC,kBAAkB,CAAC,CAAC;QAE7H,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,eAAe,GAAG,CAAC,IAAI,eAAe,GAAG,WAAW;YAC5F,MAAM,IAAI,2BAA2B,CAAC,MAAM,CAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,EAAE,eAAe,EAAE,SAAS,CAAC,sBAAsB,CAAC,CAAC;QAEzI,IAAI,CAAC,eAAe,KAAK,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,KAAK,CAAC,CAAC;YAChE,MAAM,IAAI,iBAAiB,CAAC,SAAS,CAAC,sBAAsB,EAAE,MAAM,CAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC;QAElH,IAAI,WAAW,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC;YAChD,MAAM,IAAI,iBAAiB,CAAC,SAAS,CAAC,0BAA0B,EAAE,MAAM,CAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;QAEjH,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,mBAAmB,GAAG,CAAC,GAAG,mBAAmB,CAAC,CAAC;QACpD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG,CAAC,GAAG,cAAc,CAAC,CAAC;QAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,mBAAmB,CAAC,MAAM,KAAK,CAAC,CAAC;QACjF,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;QAC7C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;IAC3E,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class FunctionCoverage {
9
+ ranges;
10
+ constructor(ranges) {
11
+ this.ranges = [...ranges];
12
+ }
13
+ }
14
+ //# sourceMappingURL=function-coverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function-coverage.js","sourceRoot":"","sources":["../../../../../src/noldova.context.testing/src/models/coverage/function-coverage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAO,gBAAgB;IACX,MAAM,CAA2B;IAEjD,YAAmB,MAAgC;QACjD,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;IAC5B,CAAC;CACF"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { nameof } from "@noldova/context.core";
9
+ import { ArgumentOutOfRangeException } from "@noldova/context.exceptions";
10
+ import { Resources } from "../../resources.js";
11
+ export class LineRange {
12
+ startLine;
13
+ endLine;
14
+ displayText;
15
+ constructor(startLine, endLine) {
16
+ if (!Number.isInteger(startLine) || startLine < 1)
17
+ throw new ArgumentOutOfRangeException(nameof(t => t.startLine), startLine, Resources.startLineInvalid);
18
+ if (!Number.isInteger(endLine) || endLine < startLine)
19
+ throw new ArgumentOutOfRangeException(nameof(t => t.endLine), endLine, Resources.endLineInvalid);
20
+ this.startLine = startLine;
21
+ this.endLine = endLine;
22
+ this.displayText = this.startLine === this.endLine ? `${this.startLine}` : `${this.startLine}-${this.endLine}`;
23
+ }
24
+ }
25
+ //# sourceMappingURL=line-range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-range.js","sourceRoot":"","sources":["../../../../../src/noldova.context.testing/src/models/coverage/line-range.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,SAAS;IACJ,SAAS,CAAS;IAClB,OAAO,CAAS;IAChB,WAAW,CAAS;IAEpC,YAAmB,SAAiB,EAAE,OAAe;QACnD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC;YAC/C,MAAM,IAAI,2BAA2B,CAAC,MAAM,CAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;QAEpH,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,SAAS;YACnD,MAAM,IAAI,2BAA2B,CAAC,MAAM,CAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;QAE9G,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;IACjH,CAAC;CACF"}