Compare commits

..

11 Commits

Author SHA1 Message Date
Michal Dorner
2c87efac07 Moving README,CHANGELOG and LICENSE back to root folder
It turns out it's not possible to publish action when README is in docs folder
2021-03-24 18:22:55 +01:00
Michal Dorner
383ae3ef8c Fix path to assets in README 2021-03-24 18:17:10 +01:00
Michal Dorner
8a00817999 Update CHANGELOG for v1.3.1 2021-03-24 18:15:49 +01:00
Michal Dorner
bab8ddc2ca Move README, CHANGELOG and LICENSE to docs folder 2021-03-24 18:10:44 +01:00
Michal Dorner
10268d2d6d Merge pull request #86 from dorny/issue-82-net-trx-no-duration
Fixes #82: net-trx parser handles missing duration attribute
2021-03-24 18:08:55 +01:00
Michal Dorner
d29a37e78a Fixes #82 - net-trx parser handles missing duration attribute 2021-03-24 18:02:31 +01:00
Michal Dorner
faaff05398 Merge pull request #85 from dorny/dart-json-fix-duplicated-group-name
dart-json: remove group name from test case names
2021-03-23 22:03:16 +01:00
Michal Dorner
d5e42b8d57 dart-json: remove group name from test case names 2021-03-23 21:58:20 +01:00
Michal Dorner
40df4133f9 Merge pull request #84 from Shazwazza/patch-1
Fixes #83 - parsing .NET duration without milliseconds throws error
2021-03-23 21:45:24 +01:00
Michal Dorner
3a0bb833dc #83 - Use non-capturing optional group, add tests and update dist 2021-03-23 21:39:47 +01:00
Shannon Deminick
c0e7f7f7dc Fixes #83
This regex change should match the dotnet format with or without milliseconds
2021-03-23 11:09:02 +11:00
12 changed files with 451 additions and 401 deletions

View File

@@ -1,5 +1,10 @@
# Changelog # Changelog
## v1.3.1
- [Fix: parsing of .NET duration string without milliseconds](https://github.com/dorny/test-reporter/pull/84)
- [Fix: dart-json - remove group name from test case names](https://github.com/dorny/test-reporter/pull/85)
- [Fix: net-trx parser crashing on missing duration attribute](https://github.com/dorny/test-reporter/pull/86)
## v1.3.0 ## v1.3.0
- [Add support for java-junit](https://github.com/dorny/test-reporter/pull/80) - [Add support for java-junit](https://github.com/dorny/test-reporter/pull/80)
- [Fix: Handle test reports with no test cases](https://github.com/dorny/test-reporter/pull/70) - [Fix: Handle test reports with no test cases](https://github.com/dorny/test-reporter/pull/70)

View File

@@ -288,4 +288,4 @@ Unfortunately there are some known issues and limitations caused by GitHub API:
## License ## License
The scripts and documentation in this project are released under the [MIT License](https://github.com/dorny/test-reporter/blob/master/LICENSE) The scripts and documentation in this project are released under the [MIT License](https://github.com/dorny/test-reporter/blob/main/LICENSE)

View File

@@ -11,18 +11,18 @@
**Test 1** **Test 1**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|Test 1 Passing test|36ms| |✔️|Passing test|36ms|
**Test 1 Test 1.1** **Test 1 Test 1.1**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|❌|Test 1 Test 1.1 Failing test|20ms| |❌|Failing test|20ms|
|❌|Test 1 Test 1.1 Exception in target unit|6ms| |❌|Exception in target unit|6ms|
**Test 2** **Test 2**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|❌|Test 2 Exception in test|12ms| |❌|Exception in test|12ms|
### <a id="user-content-r0s1" href="#r0s1">test/second_test.dart</a> ❌ ### <a id="user-content-r0s1" href="#r0s1">test/second_test.dart</a> ❌
**2** tests were completed in **51ms** with **0** passed, **1** failed and **1** skipped. **2** tests were completed in **51ms** with **0** passed, **1** failed and **1** skipped.

View File

@@ -25,46 +25,46 @@
**ChangeNotifierProvider** **ChangeNotifierProvider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ChangeNotifierProvider default|189ms| |✔️|default|189ms|
|✔️|ChangeNotifierProvider .value|10ms| |✔️|.value|10ms|
**ListenableProvider** **ListenableProvider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ListenableProvider default|9ms| |✔️|default|9ms|
|✔️|ListenableProvider .value|16ms| |✔️|.value|16ms|
**Provider** **Provider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|Provider default|11ms| |✔️|default|11ms|
|✔️|Provider .value|8ms| |✔️|.value|8ms|
**ProxyProvider** **ProxyProvider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ProxyProvider 0|11ms| |✔️|0|11ms|
|✔️|ProxyProvider 1|10ms| |✔️|1|10ms|
|✔️|ProxyProvider 2|8ms| |✔️|2|8ms|
|✔️|ProxyProvider 3|10ms| |✔️|3|10ms|
|✔️|ProxyProvider 4|9ms| |✔️|4|9ms|
|✔️|ProxyProvider 5|9ms| |✔️|5|9ms|
|✔️|ProxyProvider 6|9ms| |✔️|6|9ms|
**MultiProvider** **MultiProvider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|MultiProvider with 1 ChangeNotifierProvider default|9ms| |✔️|with 1 ChangeNotifierProvider default|9ms|
|✔️|MultiProvider with 2 ChangeNotifierProvider default|9ms| |✔️|with 2 ChangeNotifierProvider default|9ms|
|✔️|MultiProvider with ListenableProvider default|12ms| |✔️|with ListenableProvider default|12ms|
|✔️|MultiProvider with Provider default|8ms| |✔️|with Provider default|8ms|
|✔️|MultiProvider with ProxyProvider0|7ms| |✔️|with ProxyProvider0|7ms|
|✔️|MultiProvider with ProxyProvider1|9ms| |✔️|with ProxyProvider1|9ms|
|✔️|MultiProvider with ProxyProvider2|7ms| |✔️|with ProxyProvider2|7ms|
|✔️|MultiProvider with ProxyProvider3|9ms| |✔️|with ProxyProvider3|9ms|
|✔️|MultiProvider with ProxyProvider4|9ms| |✔️|with ProxyProvider4|9ms|
|✔️|MultiProvider with ProxyProvider5|7ms| |✔️|with ProxyProvider5|7ms|
|✔️|MultiProvider with ProxyProvider6|7ms| |✔️|with ProxyProvider6|7ms|
### <a id="user-content-r0s1" href="#r0s1">test/change_notifier_provider_test.dart</a> ✔️ ### <a id="user-content-r0s1" href="#r0s1">test/change_notifier_provider_test.dart</a> ✔️
**10** tests were completed in **306ms** with **10** passed, **0** failed and **0** skipped. **10** tests were completed in **306ms** with **10** passed, **0** failed and **0** skipped.
@@ -75,59 +75,59 @@
**ChangeNotifierProvider** **ChangeNotifierProvider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ChangeNotifierProvider value|185ms| |✔️|value|185ms|
|✔️|ChangeNotifierProvider builder|18ms| |✔️|builder|18ms|
|✔️|ChangeNotifierProvider builder1|12ms| |✔️|builder1|12ms|
|✔️|ChangeNotifierProvider builder2|12ms| |✔️|builder2|12ms|
|✔️|ChangeNotifierProvider builder3|19ms| |✔️|builder3|19ms|
|✔️|ChangeNotifierProvider builder4|14ms| |✔️|builder4|14ms|
|✔️|ChangeNotifierProvider builder5|15ms| |✔️|builder5|15ms|
|✔️|ChangeNotifierProvider builder6|11ms| |✔️|builder6|11ms|
|✔️|ChangeNotifierProvider builder0|10ms| |✔️|builder0|10ms|
### <a id="user-content-r0s2" href="#r0s2">test/consumer_test.dart</a> ✔️ ### <a id="user-content-r0s2" href="#r0s2">test/consumer_test.dart</a> ✔️
**18** tests were completed in **340ms** with **18** passed, **0** failed and **0** skipped. **18** tests were completed in **340ms** with **18** passed, **0** failed and **0** skipped.
**consumer** **consumer**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|consumer obtains value from Provider<T>|181ms| |✔️|obtains value from Provider<T>|181ms|
|✔️|consumer crashed with no builder|11ms| |✔️|crashed with no builder|11ms|
|✔️|consumer can be used inside MultiProvider|16ms| |✔️|can be used inside MultiProvider|16ms|
**consumer2** **consumer2**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|consumer2 obtains value from Provider<T>|22ms| |✔️|obtains value from Provider<T>|22ms|
|✔️|consumer2 crashed with no builder|8ms| |✔️|crashed with no builder|8ms|
|✔️|consumer2 can be used inside MultiProvider|9ms| |✔️|can be used inside MultiProvider|9ms|
**consumer3** **consumer3**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|consumer3 obtains value from Provider<T>|9ms| |✔️|obtains value from Provider<T>|9ms|
|✔️|consumer3 crashed with no builder|7ms| |✔️|crashed with no builder|7ms|
|✔️|consumer3 can be used inside MultiProvider|8ms| |✔️|can be used inside MultiProvider|8ms|
**consumer4** **consumer4**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|consumer4 obtains value from Provider<T>|8ms| |✔️|obtains value from Provider<T>|8ms|
|✔️|consumer4 crashed with no builder|6ms| |✔️|crashed with no builder|6ms|
|✔️|consumer4 can be used inside MultiProvider|8ms| |✔️|can be used inside MultiProvider|8ms|
**consumer5** **consumer5**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|consumer5 obtains value from Provider<T>|8ms| |✔️|obtains value from Provider<T>|8ms|
|✔️|consumer5 crashed with no builder|6ms| |✔️|crashed with no builder|6ms|
|✔️|consumer5 can be used inside MultiProvider|9ms| |✔️|can be used inside MultiProvider|9ms|
**consumer6** **consumer6**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|consumer6 obtains value from Provider<T>|8ms| |✔️|obtains value from Provider<T>|8ms|
|✔️|consumer6 crashed with no builder|8ms| |✔️|crashed with no builder|8ms|
|✔️|consumer6 can be used inside MultiProvider|8ms| |✔️|can be used inside MultiProvider|8ms|
### <a id="user-content-r0s3" href="#r0s3">test/context_test.dart</a> ✔️ ### <a id="user-content-r0s3" href="#r0s3">test/context_test.dart</a> ✔️
**31** tests were completed in **698ms** with **31** passed, **0** failed and **0** skipped. **31** tests were completed in **698ms** with **31** passed, **0** failed and **0** skipped.
@@ -143,31 +143,31 @@
**BuildContext** **BuildContext**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|BuildContext internal selected value is updated|32ms| |✔️|internal selected value is updated|32ms|
|✔️|BuildContext create can use read without being lazy|11ms| |✔️|create can use read without being lazy|11ms|
|✔️|BuildContext watch can be used inside InheritedProvider.update|10ms| |✔️|watch can be used inside InheritedProvider.update|10ms|
|✔️|BuildContext select doesn't fail if it loads a provider that depends on other providers|9ms| |✔️|select doesn't fail if it loads a provider that depends on other providers|9ms|
|✔️|BuildContext don't call old selectors if the child rebuilds individually|21ms| |✔️|don't call old selectors if the child rebuilds individually|21ms|
|✔️|BuildContext selects throws inside click handlers|40ms| |✔️|selects throws inside click handlers|40ms|
|✔️|BuildContext select throws if try to read dynamic|9ms| |✔️|select throws if try to read dynamic|9ms|
|✔️|BuildContext select throws ProviderNotFoundException|9ms| |✔️|select throws ProviderNotFoundException|9ms|
|✔️|BuildContext select throws if watch called inside the callback from build|6ms| |✔️|select throws if watch called inside the callback from build|6ms|
|✔️|BuildContext select throws if read called inside the callback from build|9ms| |✔️|select throws if read called inside the callback from build|9ms|
|✔️|BuildContext select throws if select called inside the callback from build|8ms| |✔️|select throws if select called inside the callback from build|8ms|
|✔️|BuildContext select throws if read called inside the callback on dependency change|10ms| |✔️|select throws if read called inside the callback on dependency change|10ms|
|✔️|BuildContext select throws if watch called inside the callback on dependency change|17ms| |✔️|select throws if watch called inside the callback on dependency change|17ms|
|✔️|BuildContext select throws if select called inside the callback on dependency change|9ms| |✔️|select throws if select called inside the callback on dependency change|9ms|
|✔️|BuildContext can call read inside didChangeDependencies|9ms| |✔️|can call read inside didChangeDependencies|9ms|
|✔️|BuildContext select cannot be called inside didChangeDependencies|6ms| |✔️|select cannot be called inside didChangeDependencies|6ms|
|✔️|BuildContext select in initState throws|6ms| |✔️|select in initState throws|6ms|
|✔️|BuildContext watch in initState throws|10ms| |✔️|watch in initState throws|10ms|
|✔️|BuildContext read in initState works|6ms| |✔️|read in initState works|6ms|
|✔️|BuildContext consumer can be removed and selector stops to be called|7ms| |✔️|consumer can be removed and selector stops to be called|7ms|
|✔️|BuildContext context.select deeply compares maps|15ms| |✔️|context.select deeply compares maps|15ms|
|✔️|BuildContext context.select deeply compares lists|8ms| |✔️|context.select deeply compares lists|8ms|
|✔️|BuildContext context.select deeply compares iterables|8ms| |✔️|context.select deeply compares iterables|8ms|
|✔️|BuildContext context.select deeply compares sets|11ms| |✔️|context.select deeply compares sets|11ms|
|✔️|BuildContext context.watch listens to value changes|10ms| |✔️|context.watch listens to value changes|10ms|
### <a id="user-content-r0s4" href="#r0s4">test/future_provider_test.dart</a> ✔️ ### <a id="user-content-r0s4" href="#r0s4">test/future_provider_test.dart</a> ✔️
**10** tests were completed in **305ms** with **10** passed, **0** failed and **0** skipped. **10** tests were completed in **305ms** with **10** passed, **0** failed and **0** skipped.
@@ -186,7 +186,7 @@
**FutureProvider()** **FutureProvider()**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|FutureProvider() crashes if builder is null|3ms| |✔️|crashes if builder is null|3ms|
### <a id="user-content-r0s5" href="#r0s5">test/inherited_provider_test.dart</a> ✔️ ### <a id="user-content-r0s5" href="#r0s5">test/inherited_provider_test.dart</a> ✔️
**81** tests were completed in **1.117s** with **81** passed, **0** failed and **0** skipped. **81** tests were completed in **1.117s** with **81** passed, **0** failed and **0** skipped.
@@ -227,133 +227,133 @@
**diagnostics** **diagnostics**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|diagnostics InheritedProvider.value|11ms| |✔️|InheritedProvider.value|11ms|
|✔️|diagnostics InheritedProvider doesn't break lazy loading|7ms| |✔️|InheritedProvider doesn't break lazy loading|7ms|
|✔️|diagnostics InheritedProvider show if listening|7ms| |✔️|InheritedProvider show if listening|7ms|
|✔️|diagnostics DeferredInheritedProvider.value|6ms| |✔️|DeferredInheritedProvider.value|6ms|
|✔️|diagnostics DeferredInheritedProvider|16ms| |✔️|DeferredInheritedProvider|16ms|
**InheritedProvider.value()** **InheritedProvider.value()**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|InheritedProvider.value() markNeedsNotifyDependents during startListening is noop|8ms| |✔️|markNeedsNotifyDependents during startListening is noop|8ms|
|✔️|InheritedProvider.value() startListening called again when create returns new value|27ms| |✔️|startListening called again when create returns new value|27ms|
|✔️|InheritedProvider.value() startListening|19ms| |✔️|startListening|19ms|
|✔️|InheritedProvider.value() stopListening not called twice if rebuild doesn't have listeners|16ms| |✔️|stopListening not called twice if rebuild doesn't have listeners|16ms|
|✔️|InheritedProvider.value() removeListener cannot be null|22ms| |✔️|removeListener cannot be null|22ms|
|✔️|InheritedProvider.value() pass down current value|17ms| |✔️|pass down current value|17ms|
|✔️|InheritedProvider.value() default updateShouldNotify|8ms| |✔️|default updateShouldNotify|8ms|
|✔️|InheritedProvider.value() custom updateShouldNotify|32ms| |✔️|custom updateShouldNotify|32ms|
**InheritedProvider()** **InheritedProvider()**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|InheritedProvider() hasValue|16ms| |✔️|hasValue|16ms|
|✔️|InheritedProvider() provider calls update if rebuilding only due to didChangeDependencies|9ms| |✔️|provider calls update if rebuilding only due to didChangeDependencies|9ms|
|✔️|InheritedProvider() provider notifying dependents doesn't call update|11ms| |✔️|provider notifying dependents doesn't call update|11ms|
|✔️|InheritedProvider() update can call Provider.of with listen:true|7ms| |✔️|update can call Provider.of with listen:true|7ms|
|✔️|InheritedProvider() update lazy loaded can call Provider.of with listen:true|10ms| |✔️|update lazy loaded can call Provider.of with listen:true|10ms|
|✔️|InheritedProvider() markNeedsNotifyDependents during startListening is noop|22ms| |✔️|markNeedsNotifyDependents during startListening is noop|22ms|
|✔️|InheritedProvider() update can obtain parent of the same type than self|15ms| |✔️|update can obtain parent of the same type than self|15ms|
|✔️|InheritedProvider() _debugCheckInvalidValueType|22ms| |✔️|_debugCheckInvalidValueType|22ms|
|✔️|InheritedProvider() startListening|18ms| |✔️|startListening|18ms|
|✔️|InheritedProvider() startListening called again when create returns new value|20ms| |✔️|startListening called again when create returns new value|20ms|
|✔️|InheritedProvider() stopListening not called twice if rebuild doesn't have listeners|18ms| |✔️|stopListening not called twice if rebuild doesn't have listeners|18ms|
|✔️|InheritedProvider() removeListener cannot be null|16ms| |✔️|removeListener cannot be null|16ms|
|✔️|InheritedProvider() fails if initialValueBuilder calls inheritFromElement/inheritFromWiggetOfExactType|17ms| |✔️|fails if initialValueBuilder calls inheritFromElement/inheritFromWiggetOfExactType|17ms|
|✔️|InheritedProvider() builder is called on every rebuild and after a dependency change|11ms| |✔️|builder is called on every rebuild and after a dependency change|11ms|
|✔️|InheritedProvider() builder with no updateShouldNotify use ==|8ms| |✔️|builder with no updateShouldNotify use ==|8ms|
|✔️|InheritedProvider() builder calls updateShouldNotify callback|8ms| |✔️|builder calls updateShouldNotify callback|8ms|
|✔️|InheritedProvider() initialValue is transmitted to valueBuilder|8ms| |✔️|initialValue is transmitted to valueBuilder|8ms|
|✔️|InheritedProvider() calls builder again if dependencies change|22ms| |✔️|calls builder again if dependencies change|22ms|
|✔️|InheritedProvider() exposes initialValue if valueBuilder is null|20ms| |✔️|exposes initialValue if valueBuilder is null|20ms|
|✔️|InheritedProvider() call dispose on unmount|22ms| |✔️|call dispose on unmount|22ms|
|✔️|InheritedProvider() builder unmount, dispose not called if value never read|11ms| |✔️|builder unmount, dispose not called if value never read|11ms|
|✔️|InheritedProvider() call dispose after new value|9ms| |✔️|call dispose after new value|9ms|
|✔️|InheritedProvider() valueBuilder works without initialBuilder|11ms| |✔️|valueBuilder works without initialBuilder|11ms|
|✔️|InheritedProvider() calls initialValueBuilder lazily once|7ms| |✔️|calls initialValueBuilder lazily once|7ms|
|✔️|InheritedProvider() throws if both builder and initialBuilder are missing|5ms| |✔️|throws if both builder and initialBuilder are missing|5ms|
**DeferredInheritedProvider.value()** **DeferredInheritedProvider.value()**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|DeferredInheritedProvider.value() hasValue|6ms| |✔️|hasValue|6ms|
|✔️|DeferredInheritedProvider.value() startListening|9ms| |✔️|startListening|9ms|
|✔️|DeferredInheritedProvider.value() stopListening cannot be null|9ms| |✔️|stopListening cannot be null|9ms|
|✔️|DeferredInheritedProvider.value() startListening doesn't need setState if already initialized|8ms| |✔️|startListening doesn't need setState if already initialized|8ms|
|✔️|DeferredInheritedProvider.value() setState without updateShouldNotify|8ms| |✔️|setState without updateShouldNotify|8ms|
|✔️|DeferredInheritedProvider.value() setState with updateShouldNotify|9ms| |✔️|setState with updateShouldNotify|9ms|
|✔️|DeferredInheritedProvider.value() startListening never leave the widget uninitialized|8ms| |✔️|startListening never leave the widget uninitialized|8ms|
|✔️|DeferredInheritedProvider.value() startListening called again on controller change|10ms| |✔️|startListening called again on controller change|10ms|
**DeferredInheritedProvider()** **DeferredInheritedProvider()**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|DeferredInheritedProvider() create can't call inherited widgets|7ms| |✔️|create can't call inherited widgets|7ms|
|✔️|DeferredInheritedProvider() creates the value lazily|7ms| |✔️|creates the value lazily|7ms|
|✔️|DeferredInheritedProvider() dispose|7ms| |✔️|dispose|7ms|
|✔️|DeferredInheritedProvider() dispose no-op if never built|7ms| |✔️|dispose no-op if never built|7ms|
### <a id="user-content-r0s6" href="#r0s6">test/listenable_provider_test.dart</a> ✔️ ### <a id="user-content-r0s6" href="#r0s6">test/listenable_provider_test.dart</a> ✔️
**16** tests were completed in **353ms** with **16** passed, **0** failed and **0** skipped. **16** tests were completed in **353ms** with **16** passed, **0** failed and **0** skipped.
**ListenableProvider** **ListenableProvider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ListenableProvider works with MultiProvider|173ms| |✔️|works with MultiProvider|173ms|
|✔️|ListenableProvider asserts that the created notifier can have listeners|12ms| |✔️|asserts that the created notifier can have listeners|12ms|
|✔️|ListenableProvider don't listen again if listenable instance doesn't change|12ms| |✔️|don't listen again if listenable instance doesn't change|12ms|
|✔️|ListenableProvider works with null (default)|7ms| |✔️|works with null (default)|7ms|
|✔️|ListenableProvider works with null (create)|7ms| |✔️|works with null (create)|7ms|
|✔️|ListenableProvider stateful create called once|11ms| |✔️|stateful create called once|11ms|
|✔️|ListenableProvider dispose called on unmount|13ms| |✔️|dispose called on unmount|13ms|
|✔️|ListenableProvider dispose can be null|8ms| |✔️|dispose can be null|8ms|
|✔️|ListenableProvider changing listenable rebuilds descendants|12ms| |✔️|changing listenable rebuilds descendants|12ms|
|✔️|ListenableProvider rebuilding with the same provider don't rebuilds descendants|11ms| |✔️|rebuilding with the same provider don't rebuilds descendants|11ms|
|✔️|ListenableProvider notifylistener rebuilds descendants|9ms| |✔️|notifylistener rebuilds descendants|9ms|
**ListenableProvider value constructor** **ListenableProvider value constructor**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ListenableProvider value constructor pass down key|17ms| |✔️|pass down key|17ms|
|✔️|ListenableProvider value constructor changing the Listenable instance rebuilds dependents|29ms| |✔️|changing the Listenable instance rebuilds dependents|29ms|
**ListenableProvider stateful constructor** **ListenableProvider stateful constructor**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ListenableProvider stateful constructor called with context|8ms| |✔️|called with context|8ms|
|✔️|ListenableProvider stateful constructor pass down key|20ms| |✔️|pass down key|20ms|
|✔️|ListenableProvider stateful constructor throws if create is null|4ms| |✔️|throws if create is null|4ms|
### <a id="user-content-r0s7" href="#r0s7">test/listenable_proxy_provider_test.dart</a> ✔️ ### <a id="user-content-r0s7" href="#r0s7">test/listenable_proxy_provider_test.dart</a> ✔️
**12** tests were completed in **373ms** with **12** passed, **0** failed and **0** skipped. **12** tests were completed in **373ms** with **12** passed, **0** failed and **0** skipped.
**ListenableProxyProvider** **ListenableProxyProvider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ListenableProxyProvider throws if update is missing|43ms| |✔️|throws if update is missing|43ms|
|✔️|ListenableProxyProvider asserts that the created notifier has no listener|177ms| |✔️|asserts that the created notifier has no listener|177ms|
|✔️|ListenableProxyProvider asserts that the created notifier has no listener after rebuild|18ms| |✔️|asserts that the created notifier has no listener after rebuild|18ms|
|✔️|ListenableProxyProvider rebuilds dependendents when listeners are called|20ms| |✔️|rebuilds dependendents when listeners are called|20ms|
|✔️|ListenableProxyProvider update returning a new Listenable disposes the previously created value and update dependents|25ms| |✔️|update returning a new Listenable disposes the previously created value and update dependents|25ms|
|✔️|ListenableProxyProvider disposes of created value|13ms| |✔️|disposes of created value|13ms|
**ListenableProxyProvider variants** **ListenableProxyProvider variants**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ListenableProxyProvider variants ListenableProxyProvider|13ms| |✔️|ListenableProxyProvider|13ms|
|✔️|ListenableProxyProvider variants ListenableProxyProvider2|9ms| |✔️|ListenableProxyProvider2|9ms|
|✔️|ListenableProxyProvider variants ListenableProxyProvider3|9ms| |✔️|ListenableProxyProvider3|9ms|
|✔️|ListenableProxyProvider variants ListenableProxyProvider4|17ms| |✔️|ListenableProxyProvider4|17ms|
|✔️|ListenableProxyProvider variants ListenableProxyProvider5|12ms| |✔️|ListenableProxyProvider5|12ms|
|✔️|ListenableProxyProvider variants ListenableProxyProvider6|17ms| |✔️|ListenableProxyProvider6|17ms|
### <a id="user-content-r0s8" href="#r0s8">test/multi_provider_test.dart</a> ✔️ ### <a id="user-content-r0s8" href="#r0s8">test/multi_provider_test.dart</a> ✔️
**3** tests were completed in **198ms** with **3** passed, **0** failed and **0** skipped. **3** tests were completed in **198ms** with **3** passed, **0** failed and **0** skipped.
**MultiProvider** **MultiProvider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|MultiProvider throw if providers is null|30ms| |✔️|throw if providers is null|30ms|
|✔️|MultiProvider MultiProvider children can only access parent providers|160ms| |✔️|MultiProvider children can only access parent providers|160ms|
|✔️|MultiProvider MultiProvider.providers with ignored child|8ms| |✔️|MultiProvider.providers with ignored child|8ms|
### <a id="user-content-r0s9" href="#r0s9">test/provider_test.dart</a> ✔️ ### <a id="user-content-r0s9" href="#r0s9">test/provider_test.dart</a> ✔️
**11** tests were completed in **306ms** with **11** passed, **0** failed and **0** skipped. **11** tests were completed in **306ms** with **11** passed, **0** failed and **0** skipped.
@@ -364,46 +364,46 @@
**Provider.of** **Provider.of**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|Provider.of throws if T is dynamic|26ms| |✔️|throws if T is dynamic|26ms|
|✔️|Provider.of listen defaults to true when building widgets|13ms| |✔️|listen defaults to true when building widgets|13ms|
|✔️|Provider.of listen defaults to false outside of the widget tree|9ms| |✔️|listen defaults to false outside of the widget tree|9ms|
|✔️|Provider.of listen:false doesn't trigger rebuild|10ms| |✔️|listen:false doesn't trigger rebuild|10ms|
|✔️|Provider.of listen:true outside of the widget tree throws|11ms| |✔️|listen:true outside of the widget tree throws|11ms|
**Provider** **Provider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|Provider throws if the provided value is a Listenable/Stream|28ms| |✔️|throws if the provided value is a Listenable/Stream|28ms|
|✔️|Provider debugCheckInvalidValueType can be disabled|9ms| |✔️|debugCheckInvalidValueType can be disabled|9ms|
|✔️|Provider simple usage|9ms| |✔️|simple usage|9ms|
|✔️|Provider throws an error if no provider found|11ms| |✔️|throws an error if no provider found|11ms|
|✔️|Provider update should notify|8ms| |✔️|update should notify|8ms|
### <a id="user-content-r0s10" href="#r0s10">test/proxy_provider_test.dart</a> ✔️ ### <a id="user-content-r0s10" href="#r0s10">test/proxy_provider_test.dart</a> ✔️
**16** tests were completed in **438ms** with **16** passed, **0** failed and **0** skipped. **16** tests were completed in **438ms** with **16** passed, **0** failed and **0** skipped.
**ProxyProvider** **ProxyProvider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ProxyProvider throws if the provided value is a Listenable/Stream|209ms| |✔️|throws if the provided value is a Listenable/Stream|209ms|
|✔️|ProxyProvider debugCheckInvalidValueType can be disabled|13ms| |✔️|debugCheckInvalidValueType can be disabled|13ms|
|✔️|ProxyProvider create creates initial value|23ms| |✔️|create creates initial value|23ms|
|✔️|ProxyProvider consume another providers|18ms| |✔️|consume another providers|18ms|
|✔️|ProxyProvider rebuild descendants if value change|13ms| |✔️|rebuild descendants if value change|13ms|
|✔️|ProxyProvider call dispose when unmounted with the latest result|11ms| |✔️|call dispose when unmounted with the latest result|11ms|
|✔️|ProxyProvider don't rebuild descendants if value doesn't change|12ms| |✔️|don't rebuild descendants if value doesn't change|12ms|
|✔️|ProxyProvider pass down updateShouldNotify|19ms| |✔️|pass down updateShouldNotify|19ms|
|✔️|ProxyProvider works with MultiProvider|16ms| |✔️|works with MultiProvider|16ms|
|✔️|ProxyProvider update callback can trigger descendants setState synchronously|24ms| |✔️|update callback can trigger descendants setState synchronously|24ms|
|✔️|ProxyProvider throws if update is null|7ms| |✔️|throws if update is null|7ms|
**ProxyProvider variants** **ProxyProvider variants**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|ProxyProvider variants ProxyProvider2|18ms| |✔️|ProxyProvider2|18ms|
|✔️|ProxyProvider variants ProxyProvider3|16ms| |✔️|ProxyProvider3|16ms|
|✔️|ProxyProvider variants ProxyProvider4|9ms| |✔️|ProxyProvider4|9ms|
|✔️|ProxyProvider variants ProxyProvider5|20ms| |✔️|ProxyProvider5|20ms|
|✔️|ProxyProvider variants ProxyProvider6|10ms| |✔️|ProxyProvider6|10ms|
### <a id="user-content-r0s11" href="#r0s11">test/reassemble_test.dart</a> ✔️ ### <a id="user-content-r0s11" href="#r0s11">test/reassemble_test.dart</a> ✔️
**3** tests were completed in **221ms** with **3** passed, **0** failed and **0** skipped. **3** tests were completed in **221ms** with **3** passed, **0** failed and **0** skipped.
@@ -458,16 +458,16 @@
**StreamProvider()** **StreamProvider()**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|StreamProvider() create and dispose stream with builder|11ms| |✔️|create and dispose stream with builder|11ms|
|✔️|StreamProvider() crashes if builder is null|4ms| |✔️|crashes if builder is null|4ms|
### <a id="user-content-r0s15" href="#r0s15">test/value_listenable_provider_test.dart</a> ❌ ### <a id="user-content-r0s15" href="#r0s15">test/value_listenable_provider_test.dart</a> ❌
**5** tests were completed in **327ms** with **4** passed, **1** failed and **0** skipped. **5** tests were completed in **327ms** with **4** passed, **1** failed and **0** skipped.
**valueListenableProvider** **valueListenableProvider**
|Result|Test|Time| |Result|Test|Time|
|:---:|:---|---:| |:---:|:---|---:|
|✔️|valueListenableProvider rebuilds when value change|200ms| |✔️|rebuilds when value change|200ms|
|✔️|valueListenableProvider don't rebuild dependents by default|26ms| |✔️|don't rebuild dependents by default|26ms|
|✔️|valueListenableProvider pass keys|10ms| |✔️|pass keys|10ms|
|✔️|valueListenableProvider don't listen again if stream instance doesn't change|22ms| |✔️|don't listen again if stream instance doesn't change|22ms|
|❌|valueListenableProvider pass updateShouldNotify|69ms| |❌|pass updateShouldNotify|69ms|

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
import {parseNetDuration} from '../../src/utils/parse-utils'
describe('parseNetDuration', () => {
it('returns 0 for 00:00:00', () => {
const ms = parseNetDuration('00:00:00')
expect(ms).toBe(0)
})
it('returns 0 for 00:00:00.0000000', () => {
const ms = parseNetDuration('00:00:00.0000000')
expect(ms).toBe(0)
})
it('returns 123 for 00:00:00.123', () => {
const ms = parseNetDuration('00:00:00.123')
expect(ms).toBe(123)
})
it('returns 12 * 1000 for 00:00:12', () => {
const ms = parseNetDuration('00:00:12')
expect(ms).toBe(12 * 1000)
})
it('returns 12 * 60 * 1000 for 00:12:00', () => {
const ms = parseNetDuration('00:12:00')
expect(ms).toBe(12 * 60 * 1000)
})
it('returns 12 * 60 * 60 * 1000 for 12:00:00', () => {
const ms = parseNetDuration('12:00:00')
expect(ms).toBe(12 * 60 * 60 * 1000)
})
it('throws when string has invalid format', () => {
expect(() => parseNetDuration('12:34:56 not a duration')).toThrowError(/^Invalid format/)
})
})

11
dist/index.js generated vendored
View File

@@ -498,7 +498,10 @@ class DartJsonParser {
group.tests.sort((a, b) => { var _a, _b; return ((_a = a.testStart.test.line) !== null && _a !== void 0 ? _a : 0) - ((_b = b.testStart.test.line) !== null && _b !== void 0 ? _b : 0); }); group.tests.sort((a, b) => { var _a, _b; return ((_a = a.testStart.test.line) !== null && _a !== void 0 ? _a : 0) - ((_b = b.testStart.test.line) !== null && _b !== void 0 ? _b : 0); });
const tests = group.tests.map(tc => { const tests = group.tests.map(tc => {
const error = this.getError(suite, tc); const error = this.getError(suite, tc);
return new test_results_1.TestCaseResult(tc.testStart.test.name, tc.result, tc.time, error); const testName = group.group.name !== undefined && tc.testStart.test.name.startsWith(group.group.name)
? tc.testStart.test.name.slice(group.group.name.length).trim()
: tc.testStart.test.name.trim();
return new test_results_1.TestCaseResult(testName, tc.result, tc.time, error);
}); });
return new test_results_1.TestGroupResult(group.group.name, tests); return new test_results_1.TestGroupResult(group.group.name, tests);
}); });
@@ -694,7 +697,8 @@ class DotnetTrxParser {
} }
const output = r.unitTestResult.Output; const output = r.unitTestResult.Output;
const error = (output === null || output === void 0 ? void 0 : output.length) > 0 && ((_a = output[0].ErrorInfo) === null || _a === void 0 ? void 0 : _a.length) > 0 ? output[0].ErrorInfo[0] : undefined; const error = (output === null || output === void 0 ? void 0 : output.length) > 0 && ((_a = output[0].ErrorInfo) === null || _a === void 0 ? void 0 : _a.length) > 0 ? output[0].ErrorInfo[0] : undefined;
const duration = parse_utils_1.parseNetDuration(r.unitTestResult.$.duration); const durationAttr = r.unitTestResult.$.duration;
const duration = durationAttr ? parse_utils_1.parseNetDuration(durationAttr) : 0;
const test = new Test(r.testMethod.$.name, r.unitTestResult.$.outcome, duration, error); const test = new Test(r.testMethod.$.name, r.unitTestResult.$.outcome, duration, error);
tc.tests.push(test); tc.tests.push(test);
} }
@@ -1799,8 +1803,7 @@ exports.formatTime = formatTime;
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.parseIsoDate = exports.parseNetDuration = void 0; exports.parseIsoDate = exports.parseNetDuration = void 0;
function parseNetDuration(str) { function parseNetDuration(str) {
// matches dotnet duration: 00:00:00.0010000 const durationRe = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)$/;
const durationRe = /^(\d\d):(\d\d):(\d\d\.\d+)$/;
const durationMatch = str.match(durationRe); const durationMatch = str.match(durationRe);
if (durationMatch === null) { if (durationMatch === null) {
throw new Error(`Invalid format: "${str}" is not NET duration`); throw new Error(`Invalid format: "${str}" is not NET duration`);

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -145,7 +145,11 @@ export class DartJsonParser implements TestParser {
group.tests.sort((a, b) => (a.testStart.test.line ?? 0) - (b.testStart.test.line ?? 0)) group.tests.sort((a, b) => (a.testStart.test.line ?? 0) - (b.testStart.test.line ?? 0))
const tests = group.tests.map(tc => { const tests = group.tests.map(tc => {
const error = this.getError(suite, tc) const error = this.getError(suite, tc)
return new TestCaseResult(tc.testStart.test.name, tc.result, tc.time, error) const testName =
group.group.name !== undefined && tc.testStart.test.name.startsWith(group.group.name)
? tc.testStart.test.name.slice(group.group.name.length).trim()
: tc.testStart.test.name.trim()
return new TestCaseResult(testName, tc.result, tc.time, error)
}) })
return new TestGroupResult(group.group.name, tests) return new TestGroupResult(group.group.name, tests)
}) })

View File

@@ -86,7 +86,9 @@ export class DotnetTrxParser implements TestParser {
} }
const output = r.unitTestResult.Output const output = r.unitTestResult.Output
const error = output?.length > 0 && output[0].ErrorInfo?.length > 0 ? output[0].ErrorInfo[0] : undefined const error = output?.length > 0 && output[0].ErrorInfo?.length > 0 ? output[0].ErrorInfo[0] : undefined
const duration = parseNetDuration(r.unitTestResult.$.duration) const durationAttr = r.unitTestResult.$.duration
const duration = durationAttr ? parseNetDuration(durationAttr) : 0
const test = new Test(r.testMethod.$.name, r.unitTestResult.$.outcome, duration, error) const test = new Test(r.testMethod.$.name, r.unitTestResult.$.outcome, duration, error)
tc.tests.push(test) tc.tests.push(test)
} }

View File

@@ -43,7 +43,7 @@ export interface UnitTestResult {
$: { $: {
testId: string testId: string
testName: string testName: string
duration: string duration?: string
outcome: Outcome outcome: Outcome
} }
Output: Output[] Output: Output[]

View File

@@ -1,6 +1,5 @@
export function parseNetDuration(str: string): number { export function parseNetDuration(str: string): number {
// matches dotnet duration: 00:00:00.0010000 const durationRe = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)$/
const durationRe = /^(\d\d):(\d\d):(\d\d\.\d+)$/
const durationMatch = str.match(durationRe) const durationMatch = str.match(durationRe)
if (durationMatch === null) { if (durationMatch === null) {
throw new Error(`Invalid format: "${str}" is not NET duration`) throw new Error(`Invalid format: "${str}" is not NET duration`)