xunit.ts 1.0.1 → 1.1.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 (168) hide show
  1. package/.editorconfig +2 -0
  2. package/.eslintrc.json +37 -0
  3. package/README.md +6 -2
  4. package/cli.ts +5 -5
  5. package/dist/cli.js.map +1 -1
  6. package/dist/src/Assertions/Contains.js +1 -1
  7. package/dist/src/Assertions/Contains.js.map +1 -1
  8. package/dist/src/Assertions/Count.js.map +1 -1
  9. package/dist/src/Assertions/Defined.js +2 -2
  10. package/dist/src/Assertions/Defined.js.map +1 -1
  11. package/dist/src/Assertions/DoesNotContain.js +1 -1
  12. package/dist/src/Assertions/DoesNotContain.js.map +1 -1
  13. package/dist/src/Assertions/DoesNotThrow.js +2 -2
  14. package/dist/src/Assertions/DoesNotThrow.js.map +1 -1
  15. package/dist/src/Assertions/Empty.js +1 -1
  16. package/dist/src/Assertions/Empty.js.map +1 -1
  17. package/dist/src/Assertions/Equal.js +1 -1
  18. package/dist/src/Assertions/Equal.js.map +1 -1
  19. package/dist/src/Assertions/False.js +1 -1
  20. package/dist/src/Assertions/False.js.map +1 -1
  21. package/dist/src/Assertions/InstanceOf.d.ts +1 -1
  22. package/dist/src/Assertions/InstanceOf.d.ts.map +1 -1
  23. package/dist/src/Assertions/InstanceOf.js +1 -1
  24. package/dist/src/Assertions/InstanceOf.js.map +1 -1
  25. package/dist/src/Assertions/NotEmpty.js +2 -2
  26. package/dist/src/Assertions/NotEmpty.js.map +1 -1
  27. package/dist/src/Assertions/NotEqual.js +1 -1
  28. package/dist/src/Assertions/NotEqual.js.map +1 -1
  29. package/dist/src/Assertions/NotNull.js +2 -2
  30. package/dist/src/Assertions/NotNull.js.map +1 -1
  31. package/dist/src/Assertions/Null.js +1 -1
  32. package/dist/src/Assertions/Null.js.map +1 -1
  33. package/dist/src/Assertions/StringContains.js +1 -1
  34. package/dist/src/Assertions/StringContains.js.map +1 -1
  35. package/dist/src/Assertions/StringDoesNotContain.d.ts.map +1 -1
  36. package/dist/src/Assertions/StringDoesNotContain.js +1 -1
  37. package/dist/src/Assertions/StringDoesNotContain.js.map +1 -1
  38. package/dist/src/Assertions/StringDoesNotEndWith.js +1 -1
  39. package/dist/src/Assertions/StringDoesNotEndWith.js.map +1 -1
  40. package/dist/src/Assertions/StringDoesNotStartWith.d.ts.map +1 -1
  41. package/dist/src/Assertions/StringDoesNotStartWith.js +1 -1
  42. package/dist/src/Assertions/StringDoesNotStartWith.js.map +1 -1
  43. package/dist/src/Assertions/StringEndsWith.js +1 -1
  44. package/dist/src/Assertions/StringEndsWith.js.map +1 -1
  45. package/dist/src/Assertions/StringStartsWith.d.ts.map +1 -1
  46. package/dist/src/Assertions/StringStartsWith.js +1 -1
  47. package/dist/src/Assertions/StringStartsWith.js.map +1 -1
  48. package/dist/src/Assertions/Throws.js +1 -1
  49. package/dist/src/Assertions/Throws.js.map +1 -1
  50. package/dist/src/Assertions/True.js +1 -1
  51. package/dist/src/Assertions/True.js.map +1 -1
  52. package/dist/src/Assertions/Undefined.js +1 -1
  53. package/dist/src/Assertions/Undefined.js.map +1 -1
  54. package/dist/src/Assertions/index.d.ts +22 -22
  55. package/dist/src/Assertions/index.d.ts.map +1 -1
  56. package/dist/src/Assertions/index.js.map +1 -1
  57. package/dist/src/CLI.d.ts.map +1 -1
  58. package/dist/src/CLI.js +19 -8
  59. package/dist/src/CLI.js.map +1 -1
  60. package/dist/src/Factory.d.ts +4 -4
  61. package/dist/src/Factory.d.ts.map +1 -1
  62. package/dist/src/Factory.js.map +1 -1
  63. package/dist/src/Framework/ResultType.d.ts.map +1 -1
  64. package/dist/src/Framework/ResultType.js.map +1 -1
  65. package/dist/src/Framework/Test.d.ts.map +1 -1
  66. package/dist/src/Framework/Test.js.map +1 -1
  67. package/dist/src/Framework/TestName.d.ts.map +1 -1
  68. package/dist/src/Framework/TestName.js.map +1 -1
  69. package/dist/src/Framework/TestResult.d.ts.map +1 -1
  70. package/dist/src/Framework/TestResult.js.map +1 -1
  71. package/dist/src/Framework/TestSuite.d.ts +3 -2
  72. package/dist/src/Framework/TestSuite.d.ts.map +1 -1
  73. package/dist/src/Framework/TestSuite.js +12 -2
  74. package/dist/src/Framework/TestSuite.js.map +1 -1
  75. package/dist/src/Framework/TestSuiteResults.d.ts +1 -1
  76. package/dist/src/Framework/TestSuiteResults.d.ts.map +1 -1
  77. package/dist/src/Framework/TestSuiteResults.js.map +1 -1
  78. package/dist/src/IO/FileSystem.d.ts +2 -2
  79. package/dist/src/IO/FileSystem.d.ts.map +1 -1
  80. package/dist/src/IO/FileSystem.js +6 -6
  81. package/dist/src/IO/FileSystem.js.map +1 -1
  82. package/dist/src/IO/Output.d.ts.map +1 -1
  83. package/dist/src/IO/Output.js.map +1 -1
  84. package/dist/src/Reporters/ConsoleReporter.d.ts.map +1 -1
  85. package/dist/src/Reporters/ConsoleReporter.js +8 -7
  86. package/dist/src/Reporters/ConsoleReporter.js.map +1 -1
  87. package/dist/src/Reporters/FileReporter.d.ts.map +1 -1
  88. package/dist/src/Reporters/FileReporter.js +1 -0
  89. package/dist/src/Reporters/FileReporter.js.map +1 -1
  90. package/dist/src/Reporters/JUnitReporter.d.ts +2 -2
  91. package/dist/src/Reporters/JUnitReporter.d.ts.map +1 -1
  92. package/dist/src/Reporters/JUnitReporter.js +7 -7
  93. package/dist/src/Reporters/JUnitReporter.js.map +1 -1
  94. package/dist/src/Reporters/ResultReporter.d.ts +3 -3
  95. package/dist/src/Reporters/ResultReporter.d.ts.map +1 -1
  96. package/dist/src/Reporters/SonarReporter.d.ts +2 -2
  97. package/dist/src/Reporters/SonarReporter.d.ts.map +1 -1
  98. package/dist/src/Reporters/SonarReporter.js +16 -16
  99. package/dist/src/Reporters/SonarReporter.js.map +1 -1
  100. package/dist/src/Reporters/XMLReporter.d.ts.map +1 -1
  101. package/dist/src/Reporters/XMLReporter.js.map +1 -1
  102. package/dist/src/Runners/Runner.d.ts +3 -3
  103. package/dist/src/Runners/Runner.d.ts.map +1 -1
  104. package/dist/src/Runners/Runner.js +8 -8
  105. package/dist/src/Runners/Runner.js.map +1 -1
  106. package/dist/src/Runners/TestRunner.d.ts +4 -4
  107. package/dist/src/Runners/TestRunner.d.ts.map +1 -1
  108. package/dist/src/Runners/TestRunner.js +4 -4
  109. package/dist/src/Runners/TestRunner.js.map +1 -1
  110. package/dist/src/Runners/TestSuiteLoader.d.ts +4 -4
  111. package/dist/src/Runners/TestSuiteLoader.d.ts.map +1 -1
  112. package/dist/src/Runners/TestSuiteLoader.js +21 -18
  113. package/dist/src/Runners/TestSuiteLoader.js.map +1 -1
  114. package/dist/src/Runners/TestSuiteRunner.d.ts +6 -6
  115. package/dist/src/Runners/TestSuiteRunner.d.ts.map +1 -1
  116. package/dist/src/Runners/TestSuiteRunner.js +3 -3
  117. package/dist/src/Runners/TestSuiteRunner.js.map +1 -1
  118. package/dist/xunit.d.ts +3 -3
  119. package/dist/xunit.d.ts.map +1 -1
  120. package/dist/xunit.js.map +1 -1
  121. package/icon.svg +74 -75
  122. package/logo.svg +130 -130
  123. package/package.json +44 -37
  124. package/src/Assertions/Contains.ts +10 -10
  125. package/src/Assertions/Count.ts +11 -11
  126. package/src/Assertions/Defined.ts +11 -11
  127. package/src/Assertions/DoesNotContain.ts +11 -11
  128. package/src/Assertions/DoesNotThrow.ts +13 -13
  129. package/src/Assertions/Empty.ts +11 -11
  130. package/src/Assertions/Equal.ts +12 -12
  131. package/src/Assertions/False.ts +11 -11
  132. package/src/Assertions/InstanceOf.ts +13 -13
  133. package/src/Assertions/NotEmpty.ts +11 -11
  134. package/src/Assertions/NotEqual.ts +12 -12
  135. package/src/Assertions/NotNull.ts +11 -11
  136. package/src/Assertions/Null.ts +11 -11
  137. package/src/Assertions/StringContains.ts +11 -11
  138. package/src/Assertions/StringDoesNotContain.ts +12 -12
  139. package/src/Assertions/StringDoesNotEndWith.ts +13 -13
  140. package/src/Assertions/StringDoesNotStartWith.ts +12 -12
  141. package/src/Assertions/StringEndsWith.ts +13 -13
  142. package/src/Assertions/StringStartsWith.ts +12 -12
  143. package/src/Assertions/Throws.ts +11 -11
  144. package/src/Assertions/True.ts +11 -11
  145. package/src/Assertions/Undefined.ts +12 -12
  146. package/src/Assertions/index.ts +45 -45
  147. package/src/CLI.ts +96 -85
  148. package/src/Factory.ts +25 -25
  149. package/src/Framework/ResultType.ts +4 -4
  150. package/src/Framework/Test.ts +6 -6
  151. package/src/Framework/TestName.ts +7 -7
  152. package/src/Framework/TestResult.ts +3 -2
  153. package/src/Framework/TestSuite.ts +29 -18
  154. package/src/Framework/TestSuiteResults.ts +17 -16
  155. package/src/IO/FileSystem.ts +28 -29
  156. package/src/IO/Output.ts +21 -20
  157. package/src/Reporters/ConsoleReporter.ts +88 -87
  158. package/src/Reporters/FileReporter.ts +29 -29
  159. package/src/Reporters/JUnitReporter.ts +80 -80
  160. package/src/Reporters/ResultReporter.ts +20 -12
  161. package/src/Reporters/SonarReporter.ts +86 -86
  162. package/src/Reporters/XMLReporter.ts +6 -6
  163. package/src/Runners/Runner.ts +21 -21
  164. package/src/Runners/TestRunner.ts +34 -33
  165. package/src/Runners/TestSuiteLoader.ts +52 -45
  166. package/src/Runners/TestSuiteRunner.ts +27 -26
  167. package/tsconfig.json +26 -26
  168. package/xunit.ts +6 -6
package/logo.svg CHANGED
@@ -1,112 +1,112 @@
1
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
2
  <svg
3
- xmlns:dc="http://purl.org/dc/elements/1.1/"
4
- xmlns:cc="http://creativecommons.org/ns#"
5
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
- xmlns:svg="http://www.w3.org/2000/svg"
7
- xmlns="http://www.w3.org/2000/svg"
8
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
- inkscape:export-ydpi="96"
11
- inkscape:export-xdpi="96"
12
- inkscape:export-filename="X:\ecoAPM\xunit.ts\logo-black.png"
13
- sodipodi:docname="logo.svg"
14
- inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
15
- id="svg8"
16
- version="1.1"
17
- viewBox="0 0 400 128"
18
- height="128"
19
- width="400">
20
- <defs
21
- id="defs2">
22
- <rect
23
- id="rect2858"
24
- height="56"
25
- width="61.5"
26
- y="39"
27
- x="127.5" />
28
- <rect
29
- id="rect2746"
30
- height="38.364582"
31
- width="5.0270834"
32
- y="94.720833"
33
- x="102.39375" />
34
- </defs>
35
- <sodipodi:namedview
36
- inkscape:window-maximized="1"
37
- inkscape:window-y="-8"
38
- inkscape:window-x="-8"
39
- inkscape:window-height="1137"
40
- inkscape:window-width="1920"
41
- inkscape:pagecheckerboard="false"
42
- units="px"
43
- showgrid="false"
44
- inkscape:document-rotation="0"
45
- inkscape:current-layer="layer1"
46
- inkscape:document-units="px"
47
- inkscape:cy="111.1524"
48
- inkscape:cx="243.86486"
49
- inkscape:zoom="2"
50
- inkscape:pageshadow="2"
51
- inkscape:pageopacity="0"
52
- borderopacity="1.0"
53
- bordercolor="#666666"
54
- pagecolor="#000000"
55
- id="base" />
56
- <metadata
57
- id="metadata5">
58
- <rdf:RDF>
59
- <cc:Work
60
- rdf:about="">
61
- <dc:format>image/svg+xml</dc:format>
62
- <dc:type
63
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
64
- <dc:title></dc:title>
65
- </cc:Work>
66
- </rdf:RDF>
67
- </metadata>
68
- <g
69
- id="layer1"
70
- inkscape:groupmode="layer"
71
- inkscape:label="Layer 1">
72
- <text
73
- id="text2742"
74
- y="168.27499"
75
- x="-11.377083"
76
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:127px;line-height:1.25;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans';fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
77
- xml:space="preserve"><tspan
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
7
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ inkscape:export-ydpi="96"
10
+ inkscape:export-xdpi="96"
11
+ inkscape:export-filename="X:\ecoAPM\xunit.ts\logo-black.png"
12
+ sodipodi:docname="logo.svg"
13
+ inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
14
+ id="svg8"
15
+ version="1.1"
16
+ viewBox="0 0 400 128"
17
+ height="128"
18
+ width="400">
19
+ <defs
20
+ id="defs2">
21
+ <rect
22
+ id="rect2858"
23
+ height="56"
24
+ width="61.5"
25
+ y="39"
26
+ x="127.5"/>
27
+ <rect
28
+ id="rect2746"
29
+ height="38.364582"
30
+ width="5.0270834"
31
+ y="94.720833"
32
+ x="102.39375"/>
33
+ </defs>
34
+ <sodipodi:namedview
35
+ inkscape:window-maximized="1"
36
+ inkscape:window-y="-8"
37
+ inkscape:window-x="-8"
38
+ inkscape:window-height="1137"
39
+ inkscape:window-width="1920"
40
+ inkscape:pagecheckerboard="false"
41
+ units="px"
42
+ showgrid="false"
43
+ inkscape:document-rotation="0"
44
+ inkscape:current-layer="layer1"
45
+ inkscape:document-units="px"
46
+ inkscape:cy="111.1524"
47
+ inkscape:cx="243.86486"
48
+ inkscape:zoom="2"
49
+ inkscape:pageshadow="2"
50
+ inkscape:pageopacity="0"
51
+ borderopacity="1.0"
52
+ bordercolor="#666666"
53
+ pagecolor="#000000"
54
+ id="base"/>
55
+ <metadata
56
+ id="metadata5">
57
+ <rdf:RDF>
58
+ <cc:Work
59
+ rdf:about="">
60
+ <dc:format>image/svg+xml</dc:format>
61
+ <dc:type
62
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
63
+ <dc:title></dc:title>
64
+ </cc:Work>
65
+ </rdf:RDF>
66
+ </metadata>
67
+ <g
68
+ id="layer1"
69
+ inkscape:groupmode="layer"
70
+ inkscape:label="Layer 1">
71
+ <text
72
+ id="text2742"
73
+ y="168.27499"
74
+ x="-11.377083"
75
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:127px;line-height:1.25;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans';fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
76
+ xml:space="preserve"><tspan
78
77
  sodipodi:role="line"
79
78
  style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:127px;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans';stroke-width:0.264583"
80
79
  y="168.27499"
81
80
  x="-11.377083"
82
- id="tspan2740" /><tspan
83
- id="tspan2754"
84
- sodipodi:role="line"
85
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:127px;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans';stroke-width:0.264583"
86
- y="327.02499"
87
- x="-11.377083" /></text>
88
- <text
89
- style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2746);fill:#000000;fill-opacity:1;stroke:none;"
90
- id="text2744"
91
- xml:space="preserve" />
92
- <text
93
- id="text2752"
94
- y="26.987499"
95
- x="35.983334"
96
- style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
97
- xml:space="preserve"><tspan
81
+ id="tspan2740" />
82
+ <tspan
83
+ id="tspan2754"
84
+ sodipodi:role="line"
85
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:127px;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans';stroke-width:0.264583"
86
+ y="327.02499"
87
+ x="-11.377083"/></text>
88
+ <text
89
+ style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2746);fill:#000000;fill-opacity:1;stroke:none;"
90
+ id="text2744"
91
+ xml:space="preserve"/>
92
+ <text
93
+ id="text2752"
94
+ y="26.987499"
95
+ x="35.983334"
96
+ style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
97
+ xml:space="preserve"><tspan
98
98
  style="stroke-width:0.264583"
99
99
  y="26.987499"
100
100
  x="35.983334"
101
101
  id="tspan2750"
102
102
  sodipodi:role="line" /></text>
103
- <text
104
- transform="scale(0.99994519,1.0000548)"
105
- id="text2758"
106
- y="98.652382"
107
- x="112.43309"
108
- style="font-style:normal;font-weight:normal;font-size:95.8669px;line-height:0;font-family:sans-serif;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264216"
109
- xml:space="preserve"><tspan
103
+ <text
104
+ transform="scale(0.99994519,1.0000548)"
105
+ id="text2758"
106
+ y="98.652382"
107
+ x="112.43309"
108
+ style="font-style:normal;font-weight:normal;font-size:95.8669px;line-height:0;font-family:sans-serif;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264216"
109
+ xml:space="preserve"><tspan
110
110
  style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:95.8669px;line-height:1;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans';fill:#000000;fill-opacity:1;stroke-width:0.264216"
111
111
  y="98.652382"
112
112
  x="112.43309"
@@ -114,41 +114,41 @@
114
114
  sodipodi:role="line"><tspan
115
115
  id="tspan3014"
116
116
  style="fill:#ffffff;fill-opacity:1">unit</tspan><tspan
117
- id="tspan3000"
118
- style="fill:#808080;fill-opacity:1">.</tspan><tspan
119
- id="tspan3016"
120
- style="fill:#ffffff;fill-opacity:1">ts</tspan></tspan></text>
121
- <text
122
- style="fill:black;fill-opacity:1;line-height:1.25;stroke:none;font-family:sans-serif;font-style:normal;font-weight:normal;font-size:40px;white-space:pre;shape-inside:url(#rect2858);"
123
- id="text2856"
124
- xml:space="preserve" />
125
- </g>
126
- <g
127
- inkscape:label="Layer 2"
128
- id="layer2"
129
- inkscape:groupmode="layer">
130
- <g
131
- transform="matrix(-3.7140083,0,0,3.7296903,884.38712,-159.89914)"
132
- style="font-style:normal;font-weight:normal;font-size:50.8px;line-height:1.25;font-family:sans-serif;fill:#bfbfbf;fill-opacity:1;stroke:none;stroke-width:0.264583"
133
- id="text2766-0"
134
- aria-label="🗸">
135
- <path
136
- sodipodi:nodetypes="ccsccccc"
137
- id="path2805"
138
- style="font-size:50.8px;fill:#bfbfbf;fill-opacity:1;stroke-width:0.264583"
139
- d="m 231.8494,43.408198 0.74414,1.289843 c -4.84518,3.423047 -9.33483,7.755599 -13.46894,12.997656 -4.13412,5.242057 -7.11895,10.376628 -8.9545,15.403711 l -1.0914,0.719336 c -0.94258,0.611849 -1.75287,1.223698 -2.43086,1.835547 -1.21639,-4.400349 7.20052,-16.248511 12.05508,-21.480859 4.15065,-4.415235 8.53281,-8.003646 13.14648,-10.765234 z" />
140
- </g>
141
- <text
142
- transform="scale(0.99789547,1.002109)"
143
- xml:space="preserve"
144
- style="font-style:normal;font-weight:normal;font-size:189.07px;line-height:1.25;font-family:sans-serif;fill:#538d43;fill-opacity:1;stroke:none;stroke-width:0.984736"
145
- x="-11.659009"
146
- y="150.47635"
147
- id="text2766"><tspan
117
+ id="tspan3000"
118
+ style="fill:#808080;fill-opacity:1">.</tspan><tspan
119
+ id="tspan3016"
120
+ style="fill:#ffffff;fill-opacity:1">ts</tspan></tspan></text>
121
+ <text
122
+ style="fill:black;fill-opacity:1;line-height:1.25;stroke:none;font-family:sans-serif;font-style:normal;font-weight:normal;font-size:40px;white-space:pre;shape-inside:url(#rect2858);"
123
+ id="text2856"
124
+ xml:space="preserve"/>
125
+ </g>
126
+ <g
127
+ inkscape:label="Layer 2"
128
+ id="layer2"
129
+ inkscape:groupmode="layer">
130
+ <g
131
+ transform="matrix(-3.7140083,0,0,3.7296903,884.38712,-159.89914)"
132
+ style="font-style:normal;font-weight:normal;font-size:50.8px;line-height:1.25;font-family:sans-serif;fill:#bfbfbf;fill-opacity:1;stroke:none;stroke-width:0.264583"
133
+ id="text2766-0"
134
+ aria-label="🗸">
135
+ <path
136
+ sodipodi:nodetypes="ccsccccc"
137
+ id="path2805"
138
+ style="font-size:50.8px;fill:#bfbfbf;fill-opacity:1;stroke-width:0.264583"
139
+ d="m 231.8494,43.408198 0.74414,1.289843 c -4.84518,3.423047 -9.33483,7.755599 -13.46894,12.997656 -4.13412,5.242057 -7.11895,10.376628 -8.9545,15.403711 l -1.0914,0.719336 c -0.94258,0.611849 -1.75287,1.223698 -2.43086,1.835547 -1.21639,-4.400349 7.20052,-16.248511 12.05508,-21.480859 4.15065,-4.415235 8.53281,-8.003646 13.14648,-10.765234 z"/>
140
+ </g>
141
+ <text
142
+ transform="scale(0.99789547,1.002109)"
143
+ xml:space="preserve"
144
+ style="font-style:normal;font-weight:normal;font-size:189.07px;line-height:1.25;font-family:sans-serif;fill:#538d43;fill-opacity:1;stroke:none;stroke-width:0.984736"
145
+ x="-11.659009"
146
+ y="150.47635"
147
+ id="text2766"><tspan
148
148
  sodipodi:role="line"
149
149
  id="tspan2764"
150
150
  x="-11.659009"
151
151
  y="150.47635"
152
152
  style="font-size:189.07px;fill:#538d43;fill-opacity:1;stroke-width:0.984736">🗸</tspan></text>
153
- </g>
153
+ </g>
154
154
  </svg>
package/package.json CHANGED
@@ -1,38 +1,45 @@
1
1
  {
2
- "name": "xunit.ts",
3
- "version": "1.0.1",
4
- "description": "A unit testing framework for TypeScript, following standard xUnit patterns",
5
- "main": "dist/xunit.js",
6
- "author": "ecoAPM LLC",
7
- "homepage": "https://github.com/ecoAPM/xunit.ts",
8
- "bugs": "https://github.com/ecoAPM/xunit.ts/issues",
9
- "license": "MIT",
10
- "dependencies": {
11
- "colors": "1.4.0",
12
- "command-line-args": "5.2.0",
13
- "command-line-usage": "6.1.1",
14
- "lodash.isequal": "4.5.0",
15
- "typescript": "4.5.2",
16
- "xml": "1.0.1"
17
- },
18
- "devDependencies": {
19
- "@microsoft/tsdoc": "0.13.2",
20
- "@types/command-line-args": "5.2.0",
21
- "@types/command-line-usage": "5.0.2",
22
- "@types/lodash.isequal": "4.5.5",
23
- "@types/node": "16.11.10",
24
- "@types/xml": "1.0.6",
25
- "notosans": "5.0.0",
26
- "ts-mockito": "2.6.1",
27
- "ts-node": "10.4.0"
28
- },
29
- "scripts": {
30
- "clean": "rm -rf dist",
31
- "build": "tsc",
32
- "test": "node dist/cli.js dist/tests",
33
- "tsdoc": "cp -r node_modules/notosans/* docs/assets && ts-node tsdoc.ts"
34
- },
35
- "bin": {
36
- "xunit": "dist/cli.js"
37
- }
38
- }
2
+ "name": "xunit.ts",
3
+ "version": "1.1.0",
4
+ "description": "A unit testing framework for TypeScript, following standard xUnit patterns",
5
+ "main": "dist/xunit.js",
6
+ "author": "ecoAPM LLC",
7
+ "homepage": "https://github.com/ecoAPM/xunit.ts",
8
+ "bugs": "https://github.com/ecoAPM/xunit.ts/issues",
9
+ "license": "MIT",
10
+ "dependencies": {
11
+ "colors": "1.4.0",
12
+ "command-line-args": "5.2.1",
13
+ "command-line-usage": "6.1.1",
14
+ "lodash.isequal": "4.5.0",
15
+ "xml": "1.0.1"
16
+ },
17
+ "devDependencies": {
18
+ "@microsoft/tsdoc": "0.13.2",
19
+ "@types/command-line-args": "5.2.0",
20
+ "@types/command-line-usage": "5.0.2",
21
+ "@types/lodash.isequal": "4.5.5",
22
+ "@types/node": "17.0.19",
23
+ "@types/xml": "1.0.8",
24
+ "@typescript-eslint/eslint-plugin": "5.12.1",
25
+ "@typescript-eslint/parser": "5.12.1",
26
+ "eslint": "8.9.0",
27
+ "notosans": "5.0.0",
28
+ "ts-mockito": "2.6.1",
29
+ "ts-node": "10.5.0",
30
+ "typescript": "4.5.5"
31
+ },
32
+ "peerDependencies": {
33
+ "typescript": "^4.0.0"
34
+ },
35
+ "scripts": {
36
+ "clean": "rm -rf dist",
37
+ "build": "tsc",
38
+ "test": "node dist/cli.js dist/tests",
39
+ "xunit": "ts-node cli.ts",
40
+ "tsdoc": "cp -r node_modules/notosans/* docs/assets && ts-node tsdoc.ts"
41
+ },
42
+ "bin": {
43
+ "xunit": "dist/cli.js"
44
+ }
45
+ }
@@ -2,10 +2,10 @@ import { AssertionError } from "assert";
2
2
 
3
3
  /**
4
4
  * Asserts that an array contains a given element
5
- *
5
+ *
6
6
  * @remarks
7
7
  * Passes if array `haystack` contains an element with a value of `needle`
8
- *
8
+ *
9
9
  * Fails if array `haystack` does not contain an element with a value of `needle`
10
10
  *
11
11
  * @param needle the element to find
@@ -16,13 +16,13 @@ import { AssertionError } from "assert";
16
16
  * this.assert.contains(needle, haystack);
17
17
  */
18
18
  export default function Contains<T>(needle: T, haystack: ReadonlyArray<T>, message?: string) {
19
- if(haystack.includes(needle)) {
20
- return;
21
- }
19
+ if (haystack.includes(needle)) {
20
+ return;
21
+ }
22
22
 
23
- throw new AssertionError({
24
- message: message || 'Expected array containing expression, but array did not contain expression',
25
- expected: needle,
26
- actual: haystack
27
- });
23
+ throw new AssertionError({
24
+ message: message || "Expected array containing expression, but array did not contain expression",
25
+ expected: needle,
26
+ actual: haystack
27
+ });
28
28
  }
@@ -2,27 +2,27 @@ import { AssertionError } from "assert";
2
2
 
3
3
  /**
4
4
  * Asserts that an array contains a certain number of elements
5
- *
5
+ *
6
6
  * @remarks
7
7
  * Passes if `array` contains `expected` number of elements
8
- *
8
+ *
9
9
  * Fails if `array` does not contain `expected` number of elements
10
10
  *
11
11
  * @param expected the number of array elements expected
12
12
  * @param array the array to check the length of
13
13
  * @param message (optional) message to display on failure
14
- *
14
+ *
15
15
  * @example
16
16
  * this.assert.count(expected, array);
17
17
  */
18
18
  export default function Count(expected: number, array: ReadonlyArray<any>, message?: string) {
19
- if(array.length === expected) {
20
- return;
21
- }
19
+ if (array.length === expected) {
20
+ return;
21
+ }
22
22
 
23
- throw new AssertionError({
24
- message: message || `Expected array with ${expected} elements, but array had ${array.length} elements`,
25
- expected: expected,
26
- actual: array.length
27
- });
23
+ throw new AssertionError({
24
+ message: message || `Expected array with ${expected} elements, but array had ${array.length} elements`,
25
+ expected: expected,
26
+ actual: array.length
27
+ });
28
28
  }
@@ -2,26 +2,26 @@ import { AssertionError } from "assert";
2
2
 
3
3
  /**
4
4
  * Asserts that a value is defined (any value other than `undefined`)
5
- *
5
+ *
6
6
  * @remarks
7
7
  * Passes if `expression` does not evaluate to `undefined`
8
- *
8
+ *
9
9
  * Fails if `expression` evaluates to `undefined`
10
10
  *
11
11
  * @param expression the value to check
12
12
  * @param message (optional) message to display on failure
13
- *
13
+ *
14
14
  * @example
15
15
  * this.assert.defined(expression);
16
16
  */
17
17
  export default function Defined(expression: any, message?: string) {
18
- if(expression !== undefined) {
19
- return;
20
- }
18
+ if (expression !== undefined) {
19
+ return;
20
+ }
21
21
 
22
- throw new AssertionError({
23
- message: message || 'Expected expression to be defined, but expression is undefined',
24
- expected: '(not undefined expression)',
25
- actual: expression
26
- });
22
+ throw new AssertionError({
23
+ message: message || "Expected expression to be defined, but expression is undefined",
24
+ expected: "(not undefined expression)",
25
+ actual: expression
26
+ });
27
27
  }
@@ -2,27 +2,27 @@ import { AssertionError } from "assert";
2
2
 
3
3
  /**
4
4
  * Asserts that an array does not contain a given element
5
- *
5
+ *
6
6
  * @remarks
7
7
  * Passes if array `haystack` does not contain an element with a value of `needle`
8
- *
8
+ *
9
9
  * Fails if array `haystack` contains an element with a value of `needle`
10
10
  *
11
11
  * @param needle the element to find
12
12
  * @param haystack the array to search
13
13
  * @param message (optional) message to display on failure
14
- *
14
+ *
15
15
  * @example
16
16
  * this.assert.doesNotContain(needle, haystack);
17
17
  */
18
18
  export default function DoesNotContain<T>(needle: T, haystack: ReadonlyArray<T>, message?: string) {
19
- if(!haystack.includes(needle)) {
20
- return;
21
- }
19
+ if (!haystack.includes(needle)) {
20
+ return;
21
+ }
22
22
 
23
- throw new AssertionError({
24
- message: message || 'Expected array not containing expression, but array contained expression',
25
- expected: needle,
26
- actual: haystack
27
- });
23
+ throw new AssertionError({
24
+ message: message || "Expected array not containing expression, but array contained expression",
25
+ expected: needle,
26
+ actual: haystack
27
+ });
28
28
  }
@@ -2,27 +2,27 @@ import { AssertionError } from "assert";
2
2
 
3
3
  /**
4
4
  * Asserts that an expression does not throw an error/exception
5
- *
5
+ *
6
6
  * @remarks
7
7
  * Passes if calling `expression` does not throw an error/exception
8
- *
8
+ *
9
9
  * Fails if calling `expression` throws an error/exception
10
10
  *
11
11
  * @param expression the expression to run
12
12
  * @param message (optional) message to display on failure
13
- *
13
+ *
14
14
  * @example
15
15
  * this.assert.doesNotThrow(() => expression);
16
16
  */
17
17
  export default function DoesNotThrow(expression: () => any, message?: string) {
18
- try {
19
- expression();
20
- return;
21
- } catch (exception) {
22
- throw new AssertionError({
23
- message: message || 'Expected expression to not throw exception, but expression did throw exception',
24
- expected: '(no exception)',
25
- actual: exception
26
- });
27
- }
18
+ try {
19
+ expression();
20
+ return;
21
+ } catch (exception) {
22
+ throw new AssertionError({
23
+ message: message || "Expected expression to not throw exception, but expression did throw exception",
24
+ expected: "(no exception)",
25
+ actual: exception
26
+ });
27
+ }
28
28
  }
@@ -2,26 +2,26 @@ import { AssertionError } from "assert";
2
2
 
3
3
  /**
4
4
  * Asserts that an array is empty
5
- *
5
+ *
6
6
  * @remarks
7
7
  * Passes if `array` contains zero elements
8
- *
8
+ *
9
9
  * Fails if `array` contains any elements
10
10
  *
11
11
  * @param array the array to check
12
12
  * @param message (optional) message to display on failure
13
- *
13
+ *
14
14
  * @example
15
15
  * this.assert.empty(array);
16
16
  */
17
17
  export default function Empty(array: ReadonlyArray<any>, message?: string) {
18
- if(array.length === 0) {
19
- return;
20
- }
18
+ if (array.length === 0) {
19
+ return;
20
+ }
21
21
 
22
- throw new AssertionError({
23
- message: message || 'Expected expression to be empty, but expression was not empty',
24
- expected: [],
25
- actual: array
26
- })
22
+ throw new AssertionError({
23
+ message: message || "Expected expression to be empty, but expression was not empty",
24
+ expected: [],
25
+ actual: array
26
+ });
27
27
  }