@fluid-experimental/property-common 0.49.0 → 0.50.0-41540

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 (130) hide show
  1. package/dist/constants.d.ts +4 -0
  2. package/dist/constants.d.ts.map +1 -1
  3. package/dist/constants.js +4 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/packageVersion.d.ts +1 -1
  6. package/dist/packageVersion.d.ts.map +1 -1
  7. package/dist/packageVersion.js +1 -1
  8. package/dist/packageVersion.js.map +1 -1
  9. package/lib/chronometer.d.ts +55 -0
  10. package/lib/chronometer.d.ts.map +1 -0
  11. package/lib/chronometer.js +185 -0
  12. package/lib/chronometer.js.map +1 -0
  13. package/lib/consoleUtils.d.ts +16 -0
  14. package/lib/consoleUtils.d.ts.map +1 -0
  15. package/lib/consoleUtils.js +20 -0
  16. package/lib/consoleUtils.js.map +1 -0
  17. package/lib/constants.d.ts +1219 -0
  18. package/lib/constants.d.ts.map +1 -0
  19. package/lib/constants.js +1274 -0
  20. package/lib/constants.js.map +1 -0
  21. package/lib/datastructures/collection.d.ts +203 -0
  22. package/lib/datastructures/collection.d.ts.map +1 -0
  23. package/lib/datastructures/collection.js +377 -0
  24. package/lib/datastructures/collection.js.map +1 -0
  25. package/lib/datastructures/dataArray.d.ts +275 -0
  26. package/lib/datastructures/dataArray.d.ts.map +1 -0
  27. package/lib/datastructures/dataArray.js +497 -0
  28. package/lib/datastructures/dataArray.js.map +1 -0
  29. package/lib/datastructures/index.d.ts +9 -0
  30. package/lib/datastructures/index.d.ts.map +1 -0
  31. package/lib/datastructures/index.js +9 -0
  32. package/lib/datastructures/index.js.map +1 -0
  33. package/lib/datastructures/integer64.d.ts +47 -0
  34. package/lib/datastructures/integer64.d.ts.map +1 -0
  35. package/lib/datastructures/integer64.js +140 -0
  36. package/lib/datastructures/integer64.js.map +1 -0
  37. package/lib/datastructures/sortedCollection.d.ts +77 -0
  38. package/lib/datastructures/sortedCollection.d.ts.map +1 -0
  39. package/lib/datastructures/sortedCollection.js +140 -0
  40. package/lib/datastructures/sortedCollection.js.map +1 -0
  41. package/lib/deferredPromise.d.ts +28 -0
  42. package/lib/deferredPromise.d.ts.map +1 -0
  43. package/lib/deferredPromise.js +43 -0
  44. package/lib/deferredPromise.js.map +1 -0
  45. package/lib/deterministicRandomGenerator.d.ts +39 -0
  46. package/lib/deterministicRandomGenerator.d.ts.map +1 -0
  47. package/lib/deterministicRandomGenerator.js +83 -0
  48. package/lib/deterministicRandomGenerator.js.map +1 -0
  49. package/lib/error_objects/flaggedError.d.ts +29 -0
  50. package/lib/error_objects/flaggedError.d.ts.map +1 -0
  51. package/lib/error_objects/flaggedError.js +45 -0
  52. package/lib/error_objects/flaggedError.js.map +1 -0
  53. package/lib/error_objects/httpError.d.ts +31 -0
  54. package/lib/error_objects/httpError.d.ts.map +1 -0
  55. package/lib/error_objects/httpError.js +58 -0
  56. package/lib/error_objects/httpError.js.map +1 -0
  57. package/lib/error_objects/httpErrorNoStack.d.ts +25 -0
  58. package/lib/error_objects/httpErrorNoStack.d.ts.map +1 -0
  59. package/lib/error_objects/httpErrorNoStack.js +29 -0
  60. package/lib/error_objects/httpErrorNoStack.js.map +1 -0
  61. package/lib/error_objects/index.d.ts +9 -0
  62. package/lib/error_objects/index.d.ts.map +1 -0
  63. package/lib/error_objects/index.js +9 -0
  64. package/lib/error_objects/index.js.map +1 -0
  65. package/lib/error_objects/operationError.d.ts +32 -0
  66. package/lib/error_objects/operationError.d.ts.map +1 -0
  67. package/lib/error_objects/operationError.js +73 -0
  68. package/lib/error_objects/operationError.js.map +1 -0
  69. package/lib/guidUtils.d.ts +16 -0
  70. package/lib/guidUtils.d.ts.map +1 -0
  71. package/lib/guidUtils.js +297 -0
  72. package/lib/guidUtils.js.map +1 -0
  73. package/lib/hashCalculator.d.ts +6 -0
  74. package/lib/hashCalculator.d.ts.map +1 -0
  75. package/lib/hashCalculator.js +14 -0
  76. package/lib/hashCalculator.js.map +1 -0
  77. package/lib/index.d.ts +16 -0
  78. package/lib/index.d.ts.map +1 -0
  79. package/lib/index.js +16 -0
  80. package/lib/index.js.map +1 -0
  81. package/lib/joinPaths.d.ts +19 -0
  82. package/lib/joinPaths.d.ts.map +1 -0
  83. package/lib/joinPaths.js +28 -0
  84. package/lib/joinPaths.js.map +1 -0
  85. package/lib/packageVersion.d.ts +9 -0
  86. package/lib/packageVersion.d.ts.map +1 -0
  87. package/lib/packageVersion.js +9 -0
  88. package/lib/packageVersion.js.map +1 -0
  89. package/package.json +22 -2
  90. package/platform-dependent/package.json +1 -1
  91. package/src/constants.ts +5 -0
  92. package/src/packageVersion.ts +1 -1
  93. package/dist/test/chronometer.spec.js +0 -90
  94. package/dist/test/chronometer.spec.js.map +0 -1
  95. package/dist/test/datastructures/collection.spec.js +0 -401
  96. package/dist/test/datastructures/collection.spec.js.map +0 -1
  97. package/dist/test/datastructures/dataArray.spec.js +0 -79
  98. package/dist/test/datastructures/dataArray.spec.js.map +0 -1
  99. package/dist/test/datastructures/sortedCollection.spec.js +0 -106
  100. package/dist/test/datastructures/sortedCollection.spec.js.map +0 -1
  101. package/dist/test/deterministicRandomGenerator.spec.js +0 -18
  102. package/dist/test/deterministicRandomGenerator.spec.js.map +0 -1
  103. package/dist/test/error_objects/flaggedError.spec.js +0 -23
  104. package/dist/test/error_objects/flaggedError.spec.js.map +0 -1
  105. package/dist/test/error_objects/httpError.spec.js +0 -61
  106. package/dist/test/error_objects/httpError.spec.js.map +0 -1
  107. package/dist/test/error_objects/httpErrorNoStack.spec.js +0 -55
  108. package/dist/test/error_objects/httpErrorNoStack.spec.js.map +0 -1
  109. package/dist/test/error_objects/operationError.spec.js +0 -132
  110. package/dist/test/error_objects/operationError.spec.js.map +0 -1
  111. package/dist/test/guidUtils.spec.js +0 -184
  112. package/dist/test/guidUtils.spec.js.map +0 -1
  113. package/dist/test/strings/joinPaths.spec.js +0 -18
  114. package/dist/test/strings/joinPaths.spec.js.map +0 -1
  115. package/dist/test/tsconfig.tsbuildinfo +0 -2278
  116. package/nyc/mocha-junit-report.xml +0 -175
  117. package/src/test/chronometer.spec.ts +0 -99
  118. package/src/test/datastructures/collection.spec.ts +0 -567
  119. package/src/test/datastructures/dataArray.spec.ts +0 -81
  120. package/src/test/datastructures/sortedCollection.spec.ts +0 -128
  121. package/src/test/deterministicRandomGenerator.spec.ts +0 -18
  122. package/src/test/error_objects/flaggedError.spec.ts +0 -22
  123. package/src/test/error_objects/httpError.spec.ts +0 -68
  124. package/src/test/error_objects/httpErrorNoStack.spec.ts +0 -64
  125. package/src/test/error_objects/operationError.spec.ts +0 -152
  126. package/src/test/guidUtils.spec.ts +0 -213
  127. package/src/test/strings/joinPaths.spec.ts +0 -17
  128. package/src/test/tsconfig.json +0 -21
  129. package/tsconfig.esnext.tsbuildinfo +0 -824
  130. package/tsconfig.tsbuildinfo +0 -823
@@ -1,175 +0,0 @@
1
- <testsuite name="Mocha Tests" tests="173" failures="0" errors="0" skipped="0" timestamp="Wed, 06 Oct 2021 22:47:03 GMT" time="0.266">
2
- <testcase classname="property-common.Chronometer" name="should exist" time="0.017"/>
3
- <testcase classname="property-common.Chronometer elapsed" name="measures milliseconds" time="0.052"/>
4
- <testcase classname="property-common.Chronometer elapsed" name="measures microseconds" time="0.011"/>
5
- <testcase classname="property-common.Chronometer elapsed" name="@flaky measures seconds" time="0.011"/>
6
- <testcase classname="property-common.Chronometer elapsed" name="times promises" time="0.002"/>
7
- <testcase classname="property-common.Chronometer elapsed" name="@bugfix Cannot read property &#x27;0&#x27; of undefined" time="0"/>
8
- <testcase classname="collection" name="should add a value under a key" time="0"/>
9
- <testcase classname="collection" name="should bulk add a key-value object to the list of items" time="0"/>
10
- <testcase classname="collection" name="should remove a value associated with a key" time="0"/>
11
- <testcase classname="collection" name="should bulk remove a key-value object from the list of items" time="0"/>
12
- <testcase classname="collection" name="should check for emptyness" time="0"/>
13
- <testcase classname="collection" name="should get the first value in the collection" time="0.001"/>
14
- <testcase classname="collection" name="should get the last value in the collection" time="0"/>
15
- <testcase classname="collection" name="should get the type of the collection" time="0.01"/>
16
- <testcase classname="collection" name="should filter out values based on a predicate function" time="0.001"/>
17
- <testcase classname="collection" name="should filter out values based on a key predicate" time="0.001"/>
18
- <testcase classname="collection" name="should filter out values based on a value predicate" time="0.013"/>
19
- <testcase classname="collection" name="should return the number of elements in the collection" time="0"/>
20
- <testcase classname="collection" name="should return the list of items in an array" time="0"/>
21
- <testcase classname="collection" name="should check if an item exists" time="0.001"/>
22
- <testcase classname="collection" name="should get an item from the collection" time="0.001"/>
23
- <testcase classname="collection" name="should set the value of a key" time="0"/>
24
- <testcase classname="collection" name="should iterate over the set of items" time="0.001"/>
25
- <testcase classname="collection" name="should iterate over the set of items starting from the tail" time="0"/>
26
- <testcase classname="collection" name="should return all items in an JSON format" time="0"/>
27
- <testcase classname="collection" name="should return all keys in an array" time="0"/>
28
- <testcase classname="collection" name="should return the first item in the collection along with the key" time="0"/>
29
- <testcase classname="collection" name="should clone the collection" time="0.002"/>
30
- <testcase classname="collection" name="should copy the collection" time="0.013"/>
31
- <testcase classname="collection" name="should invoke the onAdd callback" time="0.001"/>
32
- <testcase classname="collection" name="should invoke the onRemove callback" time="0.001"/>
33
- <testcase classname="collection" name="should stop early when iterating" time="0"/>
34
- <testcase classname="collection" name="should invoke the onClear callback" time="0.002"/>
35
- <testcase classname="collection clear" name="should empty the collection" time="0.001"/>
36
- <testcase classname="collection clear" name="should return the collection itself" time="0"/>
37
- <testcase classname="BaseDataArray" name="should set, insert and remove some values in a (TypedArray) DataArray" time="0.001"/>
38
- <testcase classname="BaseDataArray" name="should set, insert and remove some values in a UniversalArray" time="0"/>
39
- <testcase classname="BaseDataArray" name="should get all elements from array" time="0.003"/>
40
- <testcase classname="BoolDataArray" name="should set, insert and remove some values" time="0"/>
41
- <testcase classname="BoolDataArray" name="should get all elements from array" time="0.001"/>
42
- <testcase classname="SortedCollection" name="should always sort the order of the keys after altering the collection" time="0.002"/>
43
- <testcase classname="SortedCollection" name="should test against adding values for keys that are of type number or string" time="0"/>
44
- <testcase classname="SortedCollection" name="should get the nearest next item in the collection" time="0.001"/>
45
- <testcase classname="SortedCollection" name="should get the nearest previous item in the collection" time="0.001"/>
46
- <testcase classname="SortedCollection" name="should clone the sorted collection" time="0.002"/>
47
- <testcase classname="property-common.DeterministicRandomGenerator" name="should exist" time="0"/>
48
- <testcase classname="property-common.FlaggedError Flags" name="can be extended" time="0"/>
49
- <testcase classname="property-common.HTTPError object" name="is instanceof Error" time="0.001"/>
50
- <testcase classname="property-common.HTTPError object" name="is instanceof HTTPError" time="0"/>
51
- <testcase classname="property-common.HTTPError toString" name="basic error message" time="0.001"/>
52
- <testcase classname="property-common.HTTPError JSON.stringify" name="stringifies" time="0"/>
53
- <testcase classname="property-common.HTTPError flags" name="default at 0" time="0"/>
54
- <testcase classname="property-common.HTTPError flags" name="can be quiet" time="0.001"/>
55
- <testcase classname="property-common.HTTPError flags" name="can be extended" time="0"/>
56
- <testcase classname="property-common.HTTPErrorNoStack object" name="is instanceof Error" time="0"/>
57
- <testcase classname="property-common.HTTPErrorNoStack object" name="is instanceof HTTPError" time="0"/>
58
- <testcase classname="property-common.HTTPErrorNoStack object" name="is instanceof HTTPErrorNoStack" time="0"/>
59
- <testcase classname="property-common.HTTPErrorNoStack object" name="has no stack parameter" time="0"/>
60
- <testcase classname="property-common.HTTPErrorNoStack flags" name="default at 0" time="0"/>
61
- <testcase classname="property-common.HTTPErrorNoStack flags" name="can be quiet" time="0"/>
62
- <testcase classname="property-common.HTTPErrorNoStack flags" name="can be extended" time="0"/>
63
- <testcase classname="property-common.OperationError object" name="is instanceof Error" time="0"/>
64
- <testcase classname="property-common.OperationError object" name="is instanceof OperationError" time="0"/>
65
- <testcase classname="property-common.OperationError object" name="stringifies" time="0.001"/>
66
- <testcase classname="property-common.OperationError toString" name="basic error message" time="0"/>
67
- <testcase classname="property-common.OperationError toString" name="full OperationError" time="0.001"/>
68
- <testcase classname="property-common.OperationError toString" name="partial OperationError" time="0"/>
69
- <testcase classname="property-common.OperationError toString" name="code only" time="0.001"/>
70
- <testcase classname="property-common.OperationError toString" name="extended flags" time="0"/>
71
- <testcase classname="property-common.OperationError fields" name="name" time="0.001"/>
72
- <testcase classname="property-common.OperationError fields" name="stack" time="0"/>
73
- <testcase classname="property-common.OperationError fields" name="operation" time="0"/>
74
- <testcase classname="property-common.OperationError fields" name="statusCode" time="0.001"/>
75
- <testcase classname="property-common.OperationError fields" name="can set the stack" time="0"/>
76
- <testcase classname="property-common.OperationError flags" name="default at 0" time="0.001"/>
77
- <testcase classname="property-common.OperationError flags" name="can be transiant" time="0"/>
78
- <testcase classname="property-common.OperationError flags" name="can be quiet" time="0"/>
79
- <testcase classname="property-common.OperationError flags" name="can be transient and quiet" time="0"/>
80
- <testcase classname="property-common.OperationError flags" name="can be extended" time="0"/>
81
- <testcase classname="Base16 generateGuid" name="should return a GUID" time="0.001"/>
82
- <testcase classname="Base16 initializeGUIDGenerator using seed 0 and enforcing it" name="should result in correct first GUID" time="0.001"/>
83
- <testcase classname="Base16 initializeGUIDGenerator using seed 0 and enforcing it" name="should replay the same sequence when called again" time="0"/>
84
- <testcase classname="Base16 initializeGUIDGenerator using seed 0 without enforcing it" name="should play a different sequence" time="0"/>
85
- <testcase classname="Base16 initializeGUIDGenerator using &#x27;null&#x27; seed and enforcing it" name="should results in same sequence as seed 0" time="0.001"/>
86
- <testcase classname="Base16 initializeGUIDGenerator using non-zero seed and enforcing it" name="should results in a different sequence" time="0"/>
87
- <testcase classname="Base16 isGUID" name="should check if a GUID is valid" time="0"/>
88
- <testcase classname="Base16 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0.001"/>
89
- <testcase classname="Base16 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
90
- <testcase classname="Base16 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0"/>
91
- <testcase classname="Base16 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0.001"/>
92
- <testcase classname="Base16 combineGuids" name="should check that combining two guids will result in an expected guid" time="0"/>
93
- <testcase classname="Base16 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0"/>
94
- <testcase classname="Base64 generateGuid" name="should return a GUID" time="0"/>
95
- <testcase classname="Base64 initializeGUIDGenerator using seed 0 and enforcing it" name="should result in correct first GUID" time="0.001"/>
96
- <testcase classname="Base64 initializeGUIDGenerator using seed 0 and enforcing it" name="should replay the same sequence when called again" time="0"/>
97
- <testcase classname="Base64 initializeGUIDGenerator using seed 0 without enforcing it" name="should play a different sequence" time="0"/>
98
- <testcase classname="Base64 initializeGUIDGenerator using &#x27;null&#x27; seed and enforcing it" name="should results in same sequence as seed 0" time="0.001"/>
99
- <testcase classname="Base64 initializeGUIDGenerator using non-zero seed and enforcing it" name="should results in a different sequence" time="0"/>
100
- <testcase classname="Base64 isGUID" name="should check if a GUID is valid" time="0"/>
101
- <testcase classname="Base64 isGUID" name="should check if a GUID is valid" time="0"/>
102
- <testcase classname="Base64 isGUID" name="should check if a GUID is valid" time="0.001"/>
103
- <testcase classname="Base64 isGUID" name="should check if a GUID is valid" time="0"/>
104
- <testcase classname="Base64 isGUID" name="should check if a GUID is valid" time="0"/>
105
- <testcase classname="Base64 isGUID" name="should check if a GUID is valid" time="0"/>
106
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0"/>
107
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
108
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0"/>
109
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
110
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0"/>
111
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
112
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0"/>
113
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
114
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0"/>
115
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
116
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0"/>
117
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
118
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0"/>
119
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
120
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0"/>
121
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
122
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0"/>
123
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
124
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0.001"/>
125
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
126
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0"/>
127
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
128
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0.001"/>
129
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
130
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0"/>
131
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
132
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0"/>
133
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
134
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0"/>
135
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
136
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0"/>
137
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
138
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0.001"/>
139
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
140
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0"/>
141
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
142
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0"/>
143
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
144
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0"/>
145
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
146
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 is correct" time="0"/>
147
- <testcase classname="Base64 guidToUint32x4" name="should check that converting a guid to Uint32x4 with parameter array is correct" time="0"/>
148
- <testcase classname="Base64 uint32x4ToGuid" name="should check that converting a Uint32x4 to guid is correct" time="0"/>
149
- <testcase classname="Base64 uint32x4ToGUID and guidToUint32x4" name="should check that converting guid to Uint32x4 and back is correct" time="0"/>
150
- <testcase classname="Base64 combineGuids" name="should check that combining two guids will result in an expected guid" time="0"/>
151
- <testcase classname="Base64 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0"/>
152
- <testcase classname="Base64 combineGuids" name="should check that combining two guids will result in an expected guid" time="0"/>
153
- <testcase classname="Base64 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0"/>
154
- <testcase classname="Base64 combineGuids" name="should check that combining two guids will result in an expected guid" time="0"/>
155
- <testcase classname="Base64 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0"/>
156
- <testcase classname="Base64 combineGuids" name="should check that combining two guids will result in an expected guid" time="0.002"/>
157
- <testcase classname="Base64 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0"/>
158
- <testcase classname="Base64 combineGuids" name="should check that combining two guids will result in an expected guid" time="0"/>
159
- <testcase classname="Base64 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0.001"/>
160
- <testcase classname="Base64 combineGuids" name="should check that combining two guids will result in an expected guid" time="0"/>
161
- <testcase classname="Base64 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0"/>
162
- <testcase classname="Base64 combineGuids" name="should check that combining two guids will result in an expected guid" time="0.001"/>
163
- <testcase classname="Base64 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0"/>
164
- <testcase classname="Base64 combineGuids" name="should check that combining two guids will result in an expected guid" time="0.001"/>
165
- <testcase classname="Base64 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0"/>
166
- <testcase classname="Base64 combineGuids" name="should check that combining two guids will result in an expected guid" time="0"/>
167
- <testcase classname="Base64 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0"/>
168
- <testcase classname="Base64 combineGuids" name="should check that combining two guids will result in an expected guid" time="0"/>
169
- <testcase classname="Base64 combineGuids" name="should not result in the expected guid if the order of combined guids are reversed" time="0"/>
170
- <testcase classname="base64Tobase16 and base16ToBase64" name="should check that converting a base64 to a GUID is correct" time="0"/>
171
- <testcase classname="base64Tobase16 and base16ToBase64" name="should check that converting a base64 to a GUID is correct" time="0"/>
172
- <testcase classname="base64Tobase16 and base16ToBase64" name="should check that converting a base64 to a GUID is correct" time="0"/>
173
- <testcase classname="base64Tobase16 and base16ToBase64" name="should check that converting a base64 to a GUID is correct" time="0"/>
174
- <testcase classname="property-common.joinPaths" name="should exist" time="0"/>
175
- </testsuite>
@@ -1,99 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
-
6
- /**
7
- * @fileoverview In this file, we will test property-common.Chronometer
8
- */
9
-
10
- import sinon from "sinon";
11
- import { expect } from "chai";
12
- import { Chronometer } from "../chronometer";
13
-
14
- describe("property-common.Chronometer", function() {
15
- it("should exist", function() {
16
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
17
- expect(Chronometer).to.exist;
18
- });
19
-
20
- describe("elapsed", function() {
21
- it("measures milliseconds", function(done) {
22
- const expectedResultMilliSec = 50;
23
- const chrono = new Chronometer();
24
- setTimeout(function() {
25
- chrono.stop();
26
- expect(chrono.elapsedSec()).to.be.at.most((expectedResultMilliSec + 500) / 1000);
27
- expect(chrono.elapsedMilliSec()).to.be.at.least(expectedResultMilliSec - 25);
28
- expect(chrono.elapsedMilliSec()).to.be.at.most(expectedResultMilliSec + 500);
29
- done();
30
- }, expectedResultMilliSec);
31
- });
32
-
33
- it("measures microseconds", function(done) {
34
- const expectedResultMilliSec = 10;
35
- const chrono = new Chronometer();
36
- setTimeout(function() {
37
- chrono.stop();
38
- expect(chrono.elapsedSec()).to.be.at.most((expectedResultMilliSec + 500) / 1000);
39
- expect(chrono.elapsedMicroSec()).to.be.at.least((expectedResultMilliSec - 25) * 1000);
40
- expect(chrono.elapsedMicroSec()).to.be.at.most((expectedResultMilliSec + 500) * 1000);
41
- done();
42
- }, expectedResultMilliSec);
43
- });
44
-
45
- it("@flaky measures seconds", function(done) {
46
- const expectedResultMilliSec = 100;
47
- const chrono = new Chronometer();
48
- setTimeout(function() {
49
- chrono.stop();
50
- expect(chrono.elapsedSec()).to.be.at.most(expectedResultMilliSec / 1000 + 50);
51
- expect(chrono.elapsedMilliSec()).to.be.at.most(expectedResultMilliSec + 50);
52
- done();
53
- }, 10);
54
- });
55
-
56
- it("times promises", async function() {
57
- const clock = sinon.useFakeTimers();
58
- const expectedElapsedMilliSec = 50;
59
- const expectedResult = 199999;
60
- let resolve;
61
- const promise = new Promise((_resolve) => { resolve = _resolve; });
62
-
63
- setTimeout(function() {
64
- resolve(expectedResult);
65
- }, expectedElapsedMilliSec);
66
-
67
- const expectations: Promise<void> = Chronometer.timePromise(async () => promise)
68
- .then(function(timedResult) {
69
- expect(timedResult.chrono.elapsedMilliSec()).to.be.at.least(expectedElapsedMilliSec - 5);
70
- expect(timedResult.chrono.elapsedMilliSec()).to.be.at.most(expectedElapsedMilliSec + 50);
71
- expect(timedResult.chrono.elapsedMicroSec()).to.be.at.least((expectedElapsedMilliSec - 5) * 1000);
72
- expect(timedResult.chrono.elapsedMicroSec()).to.be.at.most((expectedElapsedMilliSec + 50) * 1000);
73
- expect(timedResult.result).to.equal(expectedResult);
74
- })
75
- .then(function() {
76
- clock.restore();
77
- });
78
-
79
- clock.tick(expectedElapsedMilliSec + 1);
80
-
81
- return expectations;
82
- });
83
-
84
- it("@bugfix Cannot read property '0' of undefined", function(done) {
85
- let chrono = new Chronometer();
86
- // Prior to the bug fix, not stopping the chrono before measuring elapsed time
87
- // causes "Cannot read property '0' of undefined":
88
- expect(chrono.elapsedSec()).to.not.equal(undefined); // <-- chrono is not stopped
89
-
90
- chrono = new Chronometer();
91
- expect(chrono.elapsedMilliSec()).to.not.equal(undefined); // <-- chrono is not stopped
92
-
93
- chrono = new Chronometer();
94
- expect(chrono.elapsedMicroSec()).to.not.equal(undefined); // <-- chrono is not stopped
95
-
96
- done();
97
- });
98
- });
99
- });