@descryy/runtime-test-runner 0.4.12 → 0.4.13
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/dist/bounded-file.d.ts +18 -0
- package/dist/bounded-file.d.ts.map +1 -0
- package/dist/bounded-file.js +77 -0
- package/dist/bounded-file.js.map +1 -0
- package/dist/child-environment.d.ts +12 -0
- package/dist/child-environment.d.ts.map +1 -0
- package/dist/child-environment.js +124 -0
- package/dist/child-environment.js.map +1 -0
- package/dist/coverage-capture.d.ts +23 -0
- package/dist/coverage-capture.d.ts.map +1 -0
- package/dist/coverage-capture.js +165 -0
- package/dist/coverage-capture.js.map +1 -0
- package/dist/executed-coverage.d.ts +45 -0
- package/dist/executed-coverage.d.ts.map +1 -0
- package/dist/executed-coverage.js +143 -0
- package/dist/executed-coverage.js.map +1 -0
- package/dist/go-cover-profile.d.ts +29 -0
- package/dist/go-cover-profile.d.ts.map +1 -0
- package/dist/go-cover-profile.js +162 -0
- package/dist/go-cover-profile.js.map +1 -0
- package/dist/go-test.d.ts +29 -2
- package/dist/go-test.d.ts.map +1 -1
- package/dist/go-test.js +149 -30
- package/dist/go-test.js.map +1 -1
- package/dist/graph-mapping.d.ts +1 -0
- package/dist/graph-mapping.d.ts.map +1 -1
- package/dist/graph-mapping.js +78 -1
- package/dist/graph-mapping.js.map +1 -1
- package/dist/index.d.ts +21 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/lexers/c-family.d.ts +4 -0
- package/dist/lexers/c-family.d.ts.map +1 -0
- package/dist/lexers/c-family.js +221 -0
- package/dist/lexers/c-family.js.map +1 -0
- package/dist/lexers/chars.d.ts +7 -0
- package/dist/lexers/chars.d.ts.map +1 -0
- package/dist/lexers/chars.js +49 -0
- package/dist/lexers/chars.js.map +1 -0
- package/dist/lexers/index.d.ts +7 -0
- package/dist/lexers/index.d.ts.map +1 -0
- package/dist/lexers/index.js +5 -0
- package/dist/lexers/index.js.map +1 -0
- package/dist/lexers/python.d.ts +3 -0
- package/dist/lexers/python.d.ts.map +1 -0
- package/dist/lexers/python.js +101 -0
- package/dist/lexers/python.js.map +1 -0
- package/dist/quality/annotations.d.ts +14 -0
- package/dist/quality/annotations.d.ts.map +1 -0
- package/dist/quality/annotations.js +147 -0
- package/dist/quality/annotations.js.map +1 -0
- package/dist/quality/assertion-kinds.d.ts +18 -0
- package/dist/quality/assertion-kinds.d.ts.map +1 -0
- package/dist/quality/assertion-kinds.js +25 -0
- package/dist/quality/assertion-kinds.js.map +1 -0
- package/dist/quality/chains.d.ts +25 -0
- package/dist/quality/chains.d.ts.map +1 -0
- package/dist/quality/chains.js +129 -0
- package/dist/quality/chains.js.map +1 -0
- package/dist/quality/common.d.ts +31 -0
- package/dist/quality/common.d.ts.map +1 -0
- package/dist/quality/common.js +211 -0
- package/dist/quality/common.js.map +1 -0
- package/dist/quality/csharp-family.d.ts +9 -0
- package/dist/quality/csharp-family.d.ts.map +1 -0
- package/dist/quality/csharp-family.js +560 -0
- package/dist/quality/csharp-family.js.map +1 -0
- package/dist/quality/detect.d.ts +3 -0
- package/dist/quality/detect.d.ts.map +1 -0
- package/dist/quality/detect.js +348 -0
- package/dist/quality/detect.js.map +1 -0
- package/dist/quality/durations.d.ts +4 -0
- package/dist/quality/durations.d.ts.map +1 -0
- package/dist/quality/durations.js +177 -0
- package/dist/quality/durations.js.map +1 -0
- package/dist/quality/expressions.d.ts +7 -0
- package/dist/quality/expressions.d.ts.map +1 -0
- package/dist/quality/expressions.js +123 -0
- package/dist/quality/expressions.js.map +1 -0
- package/dist/quality/facts.d.ts +5 -0
- package/dist/quality/facts.d.ts.map +1 -0
- package/dist/quality/facts.js +183 -0
- package/dist/quality/facts.js.map +1 -0
- package/dist/quality/failure-of.d.ts +4 -0
- package/dist/quality/failure-of.d.ts.map +1 -0
- package/dist/quality/failure-of.js +233 -0
- package/dist/quality/failure-of.js.map +1 -0
- package/dist/quality/frameworks.d.ts +5 -0
- package/dist/quality/frameworks.d.ts.map +1 -0
- package/dist/quality/frameworks.js +20 -0
- package/dist/quality/frameworks.js.map +1 -0
- package/dist/quality/go-family.d.ts +6 -0
- package/dist/quality/go-family.d.ts.map +1 -0
- package/dist/quality/go-family.js +393 -0
- package/dist/quality/go-family.js.map +1 -0
- package/dist/quality/index.d.ts +10 -0
- package/dist/quality/index.d.ts.map +1 -0
- package/dist/quality/index.js +19 -0
- package/dist/quality/index.js.map +1 -0
- package/dist/quality/java-family.d.ts +12 -0
- package/dist/quality/java-family.d.ts.map +1 -0
- package/dist/quality/java-family.js +529 -0
- package/dist/quality/java-family.js.map +1 -0
- package/dist/quality/js-assertions.d.ts +11 -0
- package/dist/quality/js-assertions.d.ts.map +1 -0
- package/dist/quality/js-assertions.js +297 -0
- package/dist/quality/js-assertions.js.map +1 -0
- package/dist/quality/js-family.d.ts +3 -0
- package/dist/quality/js-family.d.ts.map +1 -0
- package/dist/quality/js-family.js +470 -0
- package/dist/quality/js-family.js.map +1 -0
- package/dist/quality/python-family.d.ts +6 -0
- package/dist/quality/python-family.d.ts.map +1 -0
- package/dist/quality/python-family.js +786 -0
- package/dist/quality/python-family.js.map +1 -0
- package/dist/quality/scope.d.ts +26 -0
- package/dist/quality/scope.d.ts.map +1 -0
- package/dist/quality/scope.js +33 -0
- package/dist/quality/scope.js.map +1 -0
- package/dist/quality/selectors.d.ts +14 -0
- package/dist/quality/selectors.d.ts.map +1 -0
- package/dist/quality/selectors.js +137 -0
- package/dist/quality/selectors.js.map +1 -0
- package/dist/quality/statuses.d.ts +7 -0
- package/dist/quality/statuses.d.ts.map +1 -0
- package/dist/quality/statuses.js +143 -0
- package/dist/quality/statuses.js.map +1 -0
- package/dist/quality/stream.d.ts +23 -0
- package/dist/quality/stream.d.ts.map +1 -0
- package/dist/quality/stream.js +194 -0
- package/dist/quality/stream.js.map +1 -0
- package/dist/quality/types.d.ts +88 -0
- package/dist/quality/types.d.ts.map +1 -0
- package/dist/quality/types.js +2 -0
- package/dist/quality/types.js.map +1 -0
- package/dist/run-timeout.d.ts +25 -0
- package/dist/run-timeout.d.ts.map +1 -0
- package/dist/run-timeout.js +52 -0
- package/dist/run-timeout.js.map +1 -0
- package/dist/runner-wrappers.d.ts +74 -0
- package/dist/runner-wrappers.d.ts.map +1 -0
- package/dist/runner-wrappers.js +604 -0
- package/dist/runner-wrappers.js.map +1 -0
- package/dist/swift-xctest.d.ts +15 -2
- package/dist/swift-xctest.d.ts.map +1 -1
- package/dist/swift-xctest.js +143 -20
- package/dist/swift-xctest.js.map +1 -1
- package/dist/test-runner-collector.d.ts +56 -6
- package/dist/test-runner-collector.d.ts.map +1 -1
- package/dist/test-runner-collector.js +265 -113
- package/dist/test-runner-collector.js.map +1 -1
- package/dist/testgen/csharp-facts.d.ts +3 -0
- package/dist/testgen/csharp-facts.d.ts.map +1 -0
- package/dist/testgen/csharp-facts.js +306 -0
- package/dist/testgen/csharp-facts.js.map +1 -0
- package/dist/testgen/csharp-profile.d.ts +14 -0
- package/dist/testgen/csharp-profile.d.ts.map +1 -0
- package/dist/testgen/csharp-profile.js +233 -0
- package/dist/testgen/csharp-profile.js.map +1 -0
- package/dist/testgen/declarations.d.ts +10 -0
- package/dist/testgen/declarations.d.ts.map +1 -0
- package/dist/testgen/declarations.js +110 -0
- package/dist/testgen/declarations.js.map +1 -0
- package/dist/testgen/facts-common.d.ts +33 -0
- package/dist/testgen/facts-common.d.ts.map +1 -0
- package/dist/testgen/facts-common.js +76 -0
- package/dist/testgen/facts-common.js.map +1 -0
- package/dist/testgen/failure.d.ts +4 -0
- package/dist/testgen/failure.d.ts.map +1 -0
- package/dist/testgen/failure.js +106 -0
- package/dist/testgen/failure.js.map +1 -0
- package/dist/testgen/frameworks.d.ts +6 -0
- package/dist/testgen/frameworks.d.ts.map +1 -0
- package/dist/testgen/frameworks.js +516 -0
- package/dist/testgen/frameworks.js.map +1 -0
- package/dist/testgen/go-facts.d.ts +11 -0
- package/dist/testgen/go-facts.d.ts.map +1 -0
- package/dist/testgen/go-facts.js +237 -0
- package/dist/testgen/go-facts.js.map +1 -0
- package/dist/testgen/go-profile.d.ts +6 -0
- package/dist/testgen/go-profile.d.ts.map +1 -0
- package/dist/testgen/go-profile.js +155 -0
- package/dist/testgen/go-profile.js.map +1 -0
- package/dist/testgen/index.d.ts +28 -0
- package/dist/testgen/index.d.ts.map +1 -0
- package/dist/testgen/index.js +21 -0
- package/dist/testgen/index.js.map +1 -0
- package/dist/testgen/java-build.d.ts +13 -0
- package/dist/testgen/java-build.d.ts.map +1 -0
- package/dist/testgen/java-build.js +250 -0
- package/dist/testgen/java-build.js.map +1 -0
- package/dist/testgen/java-facts.d.ts +3 -0
- package/dist/testgen/java-facts.d.ts.map +1 -0
- package/dist/testgen/java-facts.js +349 -0
- package/dist/testgen/java-facts.js.map +1 -0
- package/dist/testgen/java-profile.d.ts +13 -0
- package/dist/testgen/java-profile.d.ts.map +1 -0
- package/dist/testgen/java-profile.js +194 -0
- package/dist/testgen/java-profile.js.map +1 -0
- package/dist/testgen/languages.d.ts +11 -0
- package/dist/testgen/languages.d.ts.map +1 -0
- package/dist/testgen/languages.js +63 -0
- package/dist/testgen/languages.js.map +1 -0
- package/dist/testgen/lexer.d.ts +19 -0
- package/dist/testgen/lexer.d.ts.map +1 -0
- package/dist/testgen/lexer.js +257 -0
- package/dist/testgen/lexer.js.map +1 -0
- package/dist/testgen/mutant-core.d.ts +19 -0
- package/dist/testgen/mutant-core.d.ts.map +1 -0
- package/dist/testgen/mutant-core.js +39 -0
- package/dist/testgen/mutant-core.js.map +1 -0
- package/dist/testgen/mutants-lang.d.ts +6 -0
- package/dist/testgen/mutants-lang.d.ts.map +1 -0
- package/dist/testgen/mutants-lang.js +291 -0
- package/dist/testgen/mutants-lang.js.map +1 -0
- package/dist/testgen/mutants.d.ts +9 -0
- package/dist/testgen/mutants.d.ts.map +1 -0
- package/dist/testgen/mutants.js +148 -0
- package/dist/testgen/mutants.js.map +1 -0
- package/dist/testgen/paths.d.ts +32 -0
- package/dist/testgen/paths.d.ts.map +1 -0
- package/dist/testgen/paths.js +211 -0
- package/dist/testgen/paths.js.map +1 -0
- package/dist/testgen/process.d.ts +19 -0
- package/dist/testgen/process.d.ts.map +1 -0
- package/dist/testgen/process.js +89 -0
- package/dist/testgen/process.js.map +1 -0
- package/dist/testgen/profile-failure.d.ts +7 -0
- package/dist/testgen/profile-failure.d.ts.map +1 -0
- package/dist/testgen/profile-failure.js +29 -0
- package/dist/testgen/profile-failure.js.map +1 -0
- package/dist/testgen/python-facts.d.ts +11 -0
- package/dist/testgen/python-facts.d.ts.map +1 -0
- package/dist/testgen/python-facts.js +380 -0
- package/dist/testgen/python-facts.js.map +1 -0
- package/dist/testgen/python-profile.d.ts +4 -0
- package/dist/testgen/python-profile.d.ts.map +1 -0
- package/dist/testgen/python-profile.js +344 -0
- package/dist/testgen/python-profile.js.map +1 -0
- package/dist/testgen/source-facts.d.ts +30 -0
- package/dist/testgen/source-facts.d.ts.map +1 -0
- package/dist/testgen/source-facts.js +497 -0
- package/dist/testgen/source-facts.js.map +1 -0
- package/dist/testgen/stubs.d.ts +4 -0
- package/dist/testgen/stubs.d.ts.map +1 -0
- package/dist/testgen/stubs.js +66 -0
- package/dist/testgen/stubs.js.map +1 -0
- package/dist/testgen/toolchain.d.ts +23 -0
- package/dist/testgen/toolchain.d.ts.map +1 -0
- package/dist/testgen/toolchain.js +201 -0
- package/dist/testgen/toolchain.js.map +1 -0
- package/dist/testgen/types.d.ts +67 -0
- package/dist/testgen/types.d.ts.map +1 -0
- package/dist/testgen/types.js +2 -0
- package/dist/testgen/types.js.map +1 -0
- package/dist/v8-coverage.d.ts +21 -0
- package/dist/v8-coverage.d.ts.map +1 -0
- package/dist/v8-coverage.js +217 -0
- package/dist/v8-coverage.js.map +1 -0
- package/dist/vitest-reporter.d.ts +46 -13
- package/dist/vitest-reporter.d.ts.map +1 -1
- package/dist/vitest-reporter.js +119 -26
- package/dist/vitest-reporter.js.map +1 -1
- package/dist/vitest-version.d.ts +21 -0
- package/dist/vitest-version.d.ts.map +1 -0
- package/dist/vitest-version.js +98 -0
- package/dist/vitest-version.js.map +1 -0
- package/package.json +14 -8
- package/reporters/junit/classes/DescryJUnitListener.class +0 -0
- package/reporters/junit/classes/META-INF/services/org.junit.platform.launcher.TestExecutionListener +1 -0
- package/reporters/minitest/descry_minitest_reporter.rb +150 -0
- package/reporters/phpunit/DescryPhpUnitExtension.php +209 -0
- package/reporters/pytest/descry_pytest_plugin.py +397 -0
- package/reporters/rspec/descry_rspec_formatter.rb +175 -0
- package/reporters/xunit/bin/Release/netstandard2.0/Descry.TestLogger.deps.json +203 -0
- package/reporters/xunit/bin/Release/netstandard2.0/Descry.TestLogger.dll +0 -0
- package/reporters/xunit/bin/Release/netstandard2.0/Descry.TestLogger.pdb +0 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# §17's RSpec reporter — a custom formatter writing the same NDJSON envelope
|
|
4
|
+
# `reporter.ts`, `jest-reporter.ts`, `vitest-reporter.ts`,
|
|
5
|
+
# `DescryJUnitListener.java` and `descry_pytest_plugin.py` write (RT-108).
|
|
6
|
+
#
|
|
7
|
+
# ## Why a formatter and not the JSON or JUnit output
|
|
8
|
+
#
|
|
9
|
+
# RSpec ships both. `--format json` writes **one document at the end of the
|
|
10
|
+
# run**, so a suite that is killed, hangs, or crashes the process produces
|
|
11
|
+
# nothing at all — the failure mode where evidence matters most. RSpec's
|
|
12
|
+
# JUnit output is a third-party gem and collapses outcomes the way RT-088
|
|
13
|
+
# measured JUnit's own XML doing.
|
|
14
|
+
#
|
|
15
|
+
# The formatter API is RSpec's own event stream. Each example is reported as
|
|
16
|
+
# it finishes, and the outcome is the one RSpec computed.
|
|
17
|
+
#
|
|
18
|
+
# ## Four flavours of not-run, told apart by a snapshot rather than by prose
|
|
19
|
+
#
|
|
20
|
+
# RSpec routes `skip` and `pending` through the same `example_pending`
|
|
21
|
+
# callback, and `example.metadata` by then has been **mutated by execution**.
|
|
22
|
+
# Measured against real rspec-core 3.13.6:
|
|
23
|
+
#
|
|
24
|
+
# | how it was written | `metadata[:skip]` at `example_started` | at `example_pending` |
|
|
25
|
+
# | ------------------------- | -------------------------------------- | -------------------- |
|
|
26
|
+
# | `it "x", skip: "reason"` | `"reason"` | `"reason"` |
|
|
27
|
+
# | `xit "x"` | `"Temporarily skipped with xit"` | same |
|
|
28
|
+
# | `it "x", skip: true` | `true` | `true` |
|
|
29
|
+
# | `skip("reason")` in body | **`nil`** | `true` |
|
|
30
|
+
#
|
|
31
|
+
# So the metadata at the *end* cannot separate `skip: true` from a runtime
|
|
32
|
+
# `skip` — both read `true` — and the metadata at the *start* can, exactly.
|
|
33
|
+
# That is why this formatter registers `example_started` and snapshots.
|
|
34
|
+
# Parsing `pending_message` for the string RSpec happens to use would be a
|
|
35
|
+
# heuristic over prose, and `xit`'s message would break it first.
|
|
36
|
+
#
|
|
37
|
+
# The mapping that falls out:
|
|
38
|
+
#
|
|
39
|
+
# - declared `skip` (present at start) -> `disabled`, a developer switched it off
|
|
40
|
+
# - runtime `skip` (appears only at the end) -> `precondition-unmet`, it ran
|
|
41
|
+
# real code and bailed on an assumption. JUnit's `ABORTED` exactly.
|
|
42
|
+
# - `pending`, declared or runtime -> `not-implemented`. The test is written,
|
|
43
|
+
# it does run, and it is declared not to work yet — node:test's `todo`,
|
|
44
|
+
# not its `skip`.
|
|
45
|
+
#
|
|
46
|
+
# ## A `pending` example that passes is a failure, and stays one
|
|
47
|
+
#
|
|
48
|
+
# RSpec reports it through `example_failed` with `pending_fixed?` true:
|
|
49
|
+
# "expected to fail but it passed". Forwarded as `test:fail` with the
|
|
50
|
+
# distinction named in the payload, because "the code under test is fixed and
|
|
51
|
+
# nobody removed the marker" is a real finding and silencing it would trade a
|
|
52
|
+
# failure for a silence.
|
|
53
|
+
#
|
|
54
|
+
# ## `example_started` fires for a declared skip, unlike pytest
|
|
55
|
+
#
|
|
56
|
+
# pytest reports a declared skip as a *skipped setup phase*, so no start ever
|
|
57
|
+
# arrives. RSpec starts the example and then reports it pending. Neither is
|
|
58
|
+
# wrong; they are different, and the translator sees both because each
|
|
59
|
+
# reporter reports what its own runner does rather than normalising to the
|
|
60
|
+
# other's shape.
|
|
61
|
+
#
|
|
62
|
+
# ## The envelope version
|
|
63
|
+
#
|
|
64
|
+
# Declared before the first event, as a number: `{"version":"1"}` is read as
|
|
65
|
+
# a broken reporter rather than a matching one. Keep in step with
|
|
66
|
+
# `ENVELOPE_VERSION` in `test-runner-collector.ts` — that file is the
|
|
67
|
+
# authority, not this comment.
|
|
68
|
+
|
|
69
|
+
require "json"
|
|
70
|
+
|
|
71
|
+
class DescryRSpecFormatter
|
|
72
|
+
# Must equal ENVELOPE_VERSION in test-runner-collector.ts. A mismatch is refused there, loudly.
|
|
73
|
+
ENVELOPE_VERSION = 1
|
|
74
|
+
|
|
75
|
+
RSpec::Core::Formatters.register self,
|
|
76
|
+
:start,
|
|
77
|
+
:example_started,
|
|
78
|
+
:example_passed,
|
|
79
|
+
:example_failed,
|
|
80
|
+
:example_pending
|
|
81
|
+
|
|
82
|
+
def initialize(output)
|
|
83
|
+
@output = output
|
|
84
|
+
# example id -> what `metadata` said BEFORE the example body ran. See the
|
|
85
|
+
# table in this file's header: the end-state metadata cannot tell a
|
|
86
|
+
# declared `skip: true` from a runtime `skip`, and this can.
|
|
87
|
+
@declared = {}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def start(_notification)
|
|
91
|
+
emit({ type: "descry:envelope", data: { version: ENVELOPE_VERSION } })
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def example_started(notification)
|
|
95
|
+
example = notification.example
|
|
96
|
+
@declared[example.id] = {
|
|
97
|
+
skip: example.metadata[:skip],
|
|
98
|
+
pending: example.metadata[:pending]
|
|
99
|
+
}
|
|
100
|
+
emit({ type: "test:start", data: common(example) })
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def example_passed(notification)
|
|
104
|
+
example = notification.example
|
|
105
|
+
data = common(example)
|
|
106
|
+
duration = example.execution_result.run_time
|
|
107
|
+
data[:details] = { duration_ms: duration * 1000 } unless duration.nil?
|
|
108
|
+
emit({ type: "test:pass", data: data })
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def example_failed(notification)
|
|
112
|
+
example = notification.example
|
|
113
|
+
data = common(example)
|
|
114
|
+
error = { message: failure_text(notification) }
|
|
115
|
+
# A `pending` example that passed. Named rather than collapsed into an
|
|
116
|
+
# ordinary failure: the fix is to delete the marker, not to debug the
|
|
117
|
+
# code, and only this reporter knows which one it is.
|
|
118
|
+
error[:failureType] = "pendingFixed" if example.execution_result.pending_fixed?
|
|
119
|
+
data[:details] = { error: error }
|
|
120
|
+
emit({ type: "test:fail", data: data })
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def example_pending(notification)
|
|
124
|
+
example = notification.example
|
|
125
|
+
data = common(example)
|
|
126
|
+
data[:skip] = true
|
|
127
|
+
data[:skipReason] = skip_reason(example)
|
|
128
|
+
message = example.execution_result.pending_message
|
|
129
|
+
data[:message] = message unless message.nil?
|
|
130
|
+
emit({ type: "test:pass", data: data })
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
private
|
|
134
|
+
|
|
135
|
+
def skip_reason(example)
|
|
136
|
+
declared = @declared[example.id] || {}
|
|
137
|
+
# Read at the start, before execution mutated it.
|
|
138
|
+
return "disabled" unless declared[:skip].nil?
|
|
139
|
+
return "not-implemented" unless declared[:pending].nil?
|
|
140
|
+
# `metadata[:skip]` appeared during the run: the body executed and called
|
|
141
|
+
# `skip`. Absent both, it called `pending`, which is the same "known
|
|
142
|
+
# broken" fact as the declared form.
|
|
143
|
+
example.metadata[:skip].nil? ? "not-implemented" : "precondition-unmet"
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def common(example)
|
|
147
|
+
{
|
|
148
|
+
name: example.description,
|
|
149
|
+
# The full `describe`/`context` chain plus the example's own
|
|
150
|
+
# description — RSpec's own composition, not this formatter's.
|
|
151
|
+
qualifiedName: example.full_description,
|
|
152
|
+
file: example.metadata[:file_path],
|
|
153
|
+
line: example.metadata[:line_number]
|
|
154
|
+
}
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def failure_text(notification)
|
|
158
|
+
exception = notification.exception
|
|
159
|
+
return notification.message_lines.join("\n") if exception.nil?
|
|
160
|
+
|
|
161
|
+
"#{exception.class}: #{exception.message}"
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# **The leading newline is not cosmetic**, and the reason is measured on
|
|
165
|
+
# pytest rather than assumed here: a progress formatter writes its dots
|
|
166
|
+
# with no trailing newline, so a report emitted between two of them lands
|
|
167
|
+
# on the same line and stops being JSON. A collector then reads every
|
|
168
|
+
# result as noise while the starts come through, which looks exactly like
|
|
169
|
+
# a healthy reporter. RSpec runs a single formatter by default and would
|
|
170
|
+
# not hit it; a developer's own `.rspec` adding `--format progress` would.
|
|
171
|
+
def emit(object)
|
|
172
|
+
@output.print("\n#{JSON.generate(object)}\n")
|
|
173
|
+
@output.flush if @output.respond_to?(:flush)
|
|
174
|
+
end
|
|
175
|
+
end
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimeTarget": {
|
|
3
|
+
"name": ".NETStandard,Version=v2.0/",
|
|
4
|
+
"signature": ""
|
|
5
|
+
},
|
|
6
|
+
"compilationOptions": {},
|
|
7
|
+
"targets": {
|
|
8
|
+
".NETStandard,Version=v2.0": {},
|
|
9
|
+
".NETStandard,Version=v2.0/": {
|
|
10
|
+
"Descry.TestLogger/1.0.0": {
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"Microsoft.TestPlatform.ObjectModel": "17.8.0",
|
|
13
|
+
"NETStandard.Library": "2.0.3"
|
|
14
|
+
},
|
|
15
|
+
"runtime": {
|
|
16
|
+
"Descry.TestLogger.dll": {}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"Microsoft.NETCore.Platforms/1.1.0": {},
|
|
20
|
+
"Microsoft.TestPlatform.ObjectModel/17.8.0": {
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"NuGet.Frameworks": "6.5.0",
|
|
23
|
+
"System.Reflection.Metadata": "1.6.0"
|
|
24
|
+
},
|
|
25
|
+
"runtime": {
|
|
26
|
+
"lib/netstandard2.0/Microsoft.TestPlatform.CoreUtilities.dll": {
|
|
27
|
+
"assemblyVersion": "15.0.0.0",
|
|
28
|
+
"fileVersion": "17.800.23.55801"
|
|
29
|
+
},
|
|
30
|
+
"lib/netstandard2.0/Microsoft.TestPlatform.PlatformAbstractions.dll": {
|
|
31
|
+
"assemblyVersion": "15.0.0.0",
|
|
32
|
+
"fileVersion": "17.800.23.55801"
|
|
33
|
+
},
|
|
34
|
+
"lib/netstandard2.0/Microsoft.VisualStudio.TestPlatform.ObjectModel.dll": {
|
|
35
|
+
"assemblyVersion": "15.0.0.0",
|
|
36
|
+
"fileVersion": "17.800.23.55801"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"resources": {
|
|
40
|
+
"lib/netstandard2.0/cs/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
41
|
+
"locale": "cs"
|
|
42
|
+
},
|
|
43
|
+
"lib/netstandard2.0/cs/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
44
|
+
"locale": "cs"
|
|
45
|
+
},
|
|
46
|
+
"lib/netstandard2.0/de/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
47
|
+
"locale": "de"
|
|
48
|
+
},
|
|
49
|
+
"lib/netstandard2.0/de/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
50
|
+
"locale": "de"
|
|
51
|
+
},
|
|
52
|
+
"lib/netstandard2.0/es/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
53
|
+
"locale": "es"
|
|
54
|
+
},
|
|
55
|
+
"lib/netstandard2.0/es/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
56
|
+
"locale": "es"
|
|
57
|
+
},
|
|
58
|
+
"lib/netstandard2.0/fr/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
59
|
+
"locale": "fr"
|
|
60
|
+
},
|
|
61
|
+
"lib/netstandard2.0/fr/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
62
|
+
"locale": "fr"
|
|
63
|
+
},
|
|
64
|
+
"lib/netstandard2.0/it/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
65
|
+
"locale": "it"
|
|
66
|
+
},
|
|
67
|
+
"lib/netstandard2.0/it/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
68
|
+
"locale": "it"
|
|
69
|
+
},
|
|
70
|
+
"lib/netstandard2.0/ja/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
71
|
+
"locale": "ja"
|
|
72
|
+
},
|
|
73
|
+
"lib/netstandard2.0/ja/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
74
|
+
"locale": "ja"
|
|
75
|
+
},
|
|
76
|
+
"lib/netstandard2.0/ko/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
77
|
+
"locale": "ko"
|
|
78
|
+
},
|
|
79
|
+
"lib/netstandard2.0/ko/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
80
|
+
"locale": "ko"
|
|
81
|
+
},
|
|
82
|
+
"lib/netstandard2.0/pl/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
83
|
+
"locale": "pl"
|
|
84
|
+
},
|
|
85
|
+
"lib/netstandard2.0/pl/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
86
|
+
"locale": "pl"
|
|
87
|
+
},
|
|
88
|
+
"lib/netstandard2.0/pt-BR/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
89
|
+
"locale": "pt-BR"
|
|
90
|
+
},
|
|
91
|
+
"lib/netstandard2.0/pt-BR/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
92
|
+
"locale": "pt-BR"
|
|
93
|
+
},
|
|
94
|
+
"lib/netstandard2.0/ru/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
95
|
+
"locale": "ru"
|
|
96
|
+
},
|
|
97
|
+
"lib/netstandard2.0/ru/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
98
|
+
"locale": "ru"
|
|
99
|
+
},
|
|
100
|
+
"lib/netstandard2.0/tr/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
101
|
+
"locale": "tr"
|
|
102
|
+
},
|
|
103
|
+
"lib/netstandard2.0/tr/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
104
|
+
"locale": "tr"
|
|
105
|
+
},
|
|
106
|
+
"lib/netstandard2.0/zh-Hans/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
107
|
+
"locale": "zh-Hans"
|
|
108
|
+
},
|
|
109
|
+
"lib/netstandard2.0/zh-Hans/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
110
|
+
"locale": "zh-Hans"
|
|
111
|
+
},
|
|
112
|
+
"lib/netstandard2.0/zh-Hant/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
|
|
113
|
+
"locale": "zh-Hant"
|
|
114
|
+
},
|
|
115
|
+
"lib/netstandard2.0/zh-Hant/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
|
|
116
|
+
"locale": "zh-Hant"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"NETStandard.Library/2.0.3": {
|
|
121
|
+
"dependencies": {
|
|
122
|
+
"Microsoft.NETCore.Platforms": "1.1.0"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"NuGet.Frameworks/6.5.0": {
|
|
126
|
+
"runtime": {
|
|
127
|
+
"lib/netstandard2.0/NuGet.Frameworks.dll": {
|
|
128
|
+
"assemblyVersion": "6.5.0.154",
|
|
129
|
+
"fileVersion": "6.5.0.154"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"System.Collections.Immutable/1.5.0": {
|
|
134
|
+
"runtime": {
|
|
135
|
+
"lib/netstandard2.0/System.Collections.Immutable.dll": {
|
|
136
|
+
"assemblyVersion": "1.2.3.0",
|
|
137
|
+
"fileVersion": "4.6.26515.6"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"System.Reflection.Metadata/1.6.0": {
|
|
142
|
+
"dependencies": {
|
|
143
|
+
"System.Collections.Immutable": "1.5.0"
|
|
144
|
+
},
|
|
145
|
+
"runtime": {
|
|
146
|
+
"lib/netstandard2.0/System.Reflection.Metadata.dll": {
|
|
147
|
+
"assemblyVersion": "1.4.3.0",
|
|
148
|
+
"fileVersion": "4.6.26515.6"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"libraries": {
|
|
155
|
+
"Descry.TestLogger/1.0.0": {
|
|
156
|
+
"type": "project",
|
|
157
|
+
"serviceable": false,
|
|
158
|
+
"sha512": ""
|
|
159
|
+
},
|
|
160
|
+
"Microsoft.NETCore.Platforms/1.1.0": {
|
|
161
|
+
"type": "package",
|
|
162
|
+
"serviceable": true,
|
|
163
|
+
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
|
|
164
|
+
"path": "microsoft.netcore.platforms/1.1.0",
|
|
165
|
+
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
|
|
166
|
+
},
|
|
167
|
+
"Microsoft.TestPlatform.ObjectModel/17.8.0": {
|
|
168
|
+
"type": "package",
|
|
169
|
+
"serviceable": true,
|
|
170
|
+
"sha512": "sha512-AYy6vlpGMfz5kOFq99L93RGbqftW/8eQTqjT9iGXW6s9MRP3UdtY8idJ8rJcjeSja8A18IhIro5YnH3uv1nz4g==",
|
|
171
|
+
"path": "microsoft.testplatform.objectmodel/17.8.0",
|
|
172
|
+
"hashPath": "microsoft.testplatform.objectmodel.17.8.0.nupkg.sha512"
|
|
173
|
+
},
|
|
174
|
+
"NETStandard.Library/2.0.3": {
|
|
175
|
+
"type": "package",
|
|
176
|
+
"serviceable": true,
|
|
177
|
+
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
|
|
178
|
+
"path": "netstandard.library/2.0.3",
|
|
179
|
+
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
|
|
180
|
+
},
|
|
181
|
+
"NuGet.Frameworks/6.5.0": {
|
|
182
|
+
"type": "package",
|
|
183
|
+
"serviceable": true,
|
|
184
|
+
"sha512": "sha512-QWINE2x3MbTODsWT1Gh71GaGb5icBz4chS8VYvTgsBnsi8esgN6wtHhydd7fvToWECYGq7T4cgBBDiKD/363fg==",
|
|
185
|
+
"path": "nuget.frameworks/6.5.0",
|
|
186
|
+
"hashPath": "nuget.frameworks.6.5.0.nupkg.sha512"
|
|
187
|
+
},
|
|
188
|
+
"System.Collections.Immutable/1.5.0": {
|
|
189
|
+
"type": "package",
|
|
190
|
+
"serviceable": true,
|
|
191
|
+
"sha512": "sha512-EXKiDFsChZW0RjrZ4FYHu9aW6+P4MCgEDCklsVseRfhoO0F+dXeMSsMRAlVXIo06kGJ/zv+2w1a2uc2+kxxSaQ==",
|
|
192
|
+
"path": "system.collections.immutable/1.5.0",
|
|
193
|
+
"hashPath": "system.collections.immutable.1.5.0.nupkg.sha512"
|
|
194
|
+
},
|
|
195
|
+
"System.Reflection.Metadata/1.6.0": {
|
|
196
|
+
"type": "package",
|
|
197
|
+
"serviceable": true,
|
|
198
|
+
"sha512": "sha512-COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==",
|
|
199
|
+
"path": "system.reflection.metadata/1.6.0",
|
|
200
|
+
"hashPath": "system.reflection.metadata.1.6.0.nupkg.sha512"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
Binary file
|
|
Binary file
|