@sprucelabs/spruce-test-fixtures 62.2.24 → 62.2.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. package/package.json +19 -19
  2. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
  3. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -112
  4. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
  5. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -34
  6. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
  7. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -26
  8. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
  9. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -69
  10. package/build/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
  11. package/build/__tests__/behavioral/FakingEventResponses.test.js +0 -126
  12. package/build/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
  13. package/build/__tests__/behavioral/FixtureFactory.test.js +0 -79
  14. package/build/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
  15. package/build/__tests__/behavioral/LocationFixture.test.js +0 -144
  16. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
  17. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -95
  18. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
  19. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -35
  20. package/build/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
  21. package/build/__tests__/behavioral/MercuryFixture.test.js +0 -187
  22. package/build/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
  23. package/build/__tests__/behavioral/OrganizationFixture.test.js +0 -333
  24. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
  25. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -21
  26. package/build/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
  27. package/build/__tests__/behavioral/PersonFixture.test.js +0 -225
  28. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
  29. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -95
  30. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
  31. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -67
  32. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
  33. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -44
  34. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
  35. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -55
  36. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
  37. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -137
  38. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
  39. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -54
  40. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
  41. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -40
  42. package/build/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
  43. package/build/__tests__/behavioral/RoleFixture.test.js +0 -118
  44. package/build/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
  45. package/build/__tests__/behavioral/SkillFixture.test.js +0 -118
  46. package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
  47. package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -41
  48. package/build/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
  49. package/build/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -59
  50. package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
  51. package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -34
  52. package/build/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
  53. package/build/__tests__/behavioral/databases/DummyStore.js +0 -36
  54. package/build/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
  55. package/build/__tests__/behavioral/databases/StoreFixture.test.js +0 -156
  56. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
  57. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -73
  58. package/build/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
  59. package/build/__tests__/behavioral/faking/FakeDecorator.test.js +0 -421
  60. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
  61. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -23
  62. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
  63. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -27
  64. package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
  65. package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -93
  66. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
  67. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -56
  68. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
  69. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -141
  70. package/build/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
  71. package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -35
  72. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
  73. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -42
  74. package/build/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
  75. package/build/__tests__/behavioral/faking/FakingLocations.test.js +0 -45
  76. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
  77. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -140
  78. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
  79. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -174
  80. package/build/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
  81. package/build/__tests__/behavioral/faking/UpdatePerson.test.js +0 -32
  82. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
  83. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -321
  84. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
  85. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -48
  86. package/build/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
  87. package/build/__tests__/behavioral/faking/WhoAmI.test.js +0 -105
  88. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
  89. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -76
  90. package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
  91. package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -272
  92. package/build/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
  93. package/build/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -35
  94. package/build/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
  95. package/build/__tests__/behavioral/seeding/SeedingData.test.js +0 -271
  96. package/build/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
  97. package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -266
  98. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
  99. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -117
  100. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
  101. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -55
  102. package/build/__tests__/behavioral/views/Routing.test.d.ts +0 -36
  103. package/build/__tests__/behavioral/views/Routing.test.js +0 -177
  104. package/build/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
  105. package/build/__tests__/behavioral/views/TestingScope.test.js +0 -197
  106. package/build/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
  107. package/build/__tests__/behavioral/views/ViewPlugins.test.js +0 -83
  108. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
  109. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -55
  110. package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
  111. package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -761
  112. package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
  113. package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -29
  114. package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
  115. package/build/__tests__/support/AbstractFakeDecoratorTest.js +0 -27
  116. package/build/__tests__/support/EventFaker.d.ts +0 -5
  117. package/build/__tests__/support/EventFaker.js +0 -36
  118. package/build/__tests__/support/FakeThemeManager.d.ts +0 -8
  119. package/build/__tests__/support/FakeThemeManager.js +0 -40
  120. package/build/__tests__/support/RandomViewPlugin.d.ts +0 -2
  121. package/build/__tests__/support/RandomViewPlugin.js +0 -5
  122. package/build/__tests__/support/RandomViewPlugin2.d.ts +0 -2
  123. package/build/__tests__/support/RandomViewPlugin2.js +0 -5
  124. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.d.ts +0 -5
  125. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.js +0 -9
  126. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
  127. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -33
  128. package/build/__tests__/testDirsAndFiles/one-good-store-skill/src/.spruce/settings.json +0 -6
  129. package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.d.ts +0 -6
  130. package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.js +0 -11
  131. package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.d.ts +0 -6
  132. package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.js +0 -11
  133. package/build/__tests__/testDirsAndFiles/skill/build/.spruce/views/views.js +0 -18
  134. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
  135. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -11
  136. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
  137. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -19
  138. package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
  139. package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -31
  140. package/build/__tests__/testDirsAndFiles/skill/package.json +0 -5
  141. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/settings.json +0 -6
  142. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.d.ts +0 -7
  143. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.js +0 -17
  144. package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
  145. package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -11
  146. package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
  147. package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -31
  148. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
  149. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -128
  150. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
  151. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -40
  152. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
  153. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -23
  154. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
  155. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -80
  156. package/build/esm/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
  157. package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +0 -148
  158. package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
  159. package/build/esm/__tests__/behavioral/FixtureFactory.test.js +0 -61
  160. package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
  161. package/build/esm/__tests__/behavioral/LocationFixture.test.js +0 -173
  162. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
  163. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -113
  164. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
  165. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -41
  166. package/build/esm/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
  167. package/build/esm/__tests__/behavioral/MercuryFixture.test.js +0 -223
  168. package/build/esm/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
  169. package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +0 -389
  170. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
  171. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -18
  172. package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
  173. package/build/esm/__tests__/behavioral/PersonFixture.test.js +0 -232
  174. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
  175. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -112
  176. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
  177. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -84
  178. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
  179. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -55
  180. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
  181. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -72
  182. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
  183. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -146
  184. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
  185. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -66
  186. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
  187. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -51
  188. package/build/esm/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
  189. package/build/esm/__tests__/behavioral/RoleFixture.test.js +0 -143
  190. package/build/esm/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
  191. package/build/esm/__tests__/behavioral/SkillFixture.test.js +0 -141
  192. package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
  193. package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -53
  194. package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
  195. package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -48
  196. package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
  197. package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -28
  198. package/build/esm/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
  199. package/build/esm/__tests__/behavioral/databases/DummyStore.js +0 -43
  200. package/build/esm/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
  201. package/build/esm/__tests__/behavioral/databases/StoreFixture.test.js +0 -164
  202. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
  203. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -89
  204. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
  205. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +0 -482
  206. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
  207. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -28
  208. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
  209. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -32
  210. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
  211. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -82
  212. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
  213. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -70
  214. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
  215. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -165
  216. package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
  217. package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -43
  218. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
  219. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -55
  220. package/build/esm/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
  221. package/build/esm/__tests__/behavioral/faking/FakingLocations.test.js +0 -55
  222. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
  223. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -175
  224. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
  225. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -214
  226. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
  227. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +0 -38
  228. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
  229. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -360
  230. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
  231. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -31
  232. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
  233. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +0 -142
  234. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
  235. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -94
  236. package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
  237. package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -324
  238. package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
  239. package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -43
  240. package/build/esm/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
  241. package/build/esm/__tests__/behavioral/seeding/SeedingData.test.js +0 -314
  242. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
  243. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -322
  244. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
  245. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -138
  246. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
  247. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -70
  248. package/build/esm/__tests__/behavioral/views/Routing.test.d.ts +0 -36
  249. package/build/esm/__tests__/behavioral/views/Routing.test.js +0 -212
  250. package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
  251. package/build/esm/__tests__/behavioral/views/TestingScope.test.js +0 -238
  252. package/build/esm/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
  253. package/build/esm/__tests__/behavioral/views/ViewPlugins.test.js +0 -103
  254. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
  255. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -64
  256. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
  257. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -856
  258. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
  259. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -39
  260. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
  261. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +0 -34
  262. package/build/esm/__tests__/support/EventFaker.d.ts +0 -5
  263. package/build/esm/__tests__/support/EventFaker.js +0 -45
  264. package/build/esm/__tests__/support/FakeThemeManager.d.ts +0 -8
  265. package/build/esm/__tests__/support/FakeThemeManager.js +0 -37
  266. package/build/esm/__tests__/support/RandomViewPlugin.d.ts +0 -2
  267. package/build/esm/__tests__/support/RandomViewPlugin.js +0 -2
  268. package/build/esm/__tests__/support/RandomViewPlugin2.d.ts +0 -2
  269. package/build/esm/__tests__/support/RandomViewPlugin2.js +0 -2
  270. package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
  271. package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -41
  272. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
  273. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -9
  274. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
  275. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -28
  276. package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
  277. package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -26
  278. package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
  279. package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -9
  280. package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
  281. package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -26
@@ -1,128 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
- step((generator = generator.apply(thisArg, _arguments || [])).next());
14
- });
15
- };
16
- import { test, assert } from '@sprucelabs/test-utils';
17
- import ClientProxyDecorator from '../../ClientProxyDecorator.js';
18
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
19
- import { DEMO_NUMBER } from '../../tests/constants.js';
20
- import login from '../../tests/decorators/login.js';
21
- import MercuryFixture from '../../tests/fixtures/MercuryFixture.js';
22
- MercuryFixture.setShouldRequireLocalListeners(false);
23
- let DecoratingEmitToPassThroughProxyTest = class DecoratingEmitToPassThroughProxyTest extends AbstractSpruceFixtureTest {
24
- static sharesInstance() {
25
- const instance = this.getDecorator();
26
- assert.isEqual(instance, ClientProxyDecorator.getInstance());
27
- }
28
- static canClearInstance() {
29
- const instance = this.getDecorator();
30
- ClientProxyDecorator.clearInstance();
31
- assert.isNotEqual(instance, this.getDecorator());
32
- }
33
- static canGetAndSetProxyGenerator() {
34
- const instance = this.getDecorator();
35
- const cb = () => __awaiter(this, void 0, void 0, function* () { return '12345'; });
36
- instance.setProxyTokenGenerator(cb);
37
- assert.isEqual(instance.getProxyTokenGenerator(), cb);
38
- }
39
- static canSetDefaultProxyPassThrough(id) {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- const instance = this.getDecorator();
42
- instance.setProxyTokenGenerator(() => __awaiter(this, void 0, void 0, function* () { return id; }));
43
- const client = instance.decorateEmitToPassProxyToken(login.getClient());
44
- yield this.assertProxyEquals(client, id);
45
- });
46
- }
47
- static canSetTokenWhileDecorating() {
48
- return __awaiter(this, void 0, void 0, function* () {
49
- const instance = this.getDecorator();
50
- const client = instance.decorateEmitToPassProxyToken(login.getClient(), '123');
51
- yield this.assertProxyEquals(client, '123');
52
- this.lastInstance = this.getDecorator();
53
- });
54
- }
55
- static decoratorPassProps() {
56
- return __awaiter(this, void 0, void 0, function* () {
57
- const client = login.getClient();
58
- this.assertPropsCopied(client, 'auth', { skill: true });
59
- this.assertPropsCopied(client, 'hell', { world: 'there' });
60
- });
61
- }
62
- static assertPropsCopied(client, key, props) {
63
- const instance = this.getDecorator();
64
- client[key] = props;
65
- const decorated = instance.decorateEmitToPassProxyToken(client);
66
- //@ts-ignore
67
- assert.isEqualDeep(decorated[key], props);
68
- }
69
- static instanceIsSameEachTest() {
70
- return __awaiter(this, void 0, void 0, function* () {
71
- assert.isEqual(this.lastInstance, this.getDecorator());
72
- });
73
- }
74
- static loginSetsUpProxyTokenGenerator() {
75
- return __awaiter(this, void 0, void 0, function* () {
76
- const generator = this.getDecorator().getProxyTokenGenerator();
77
- assert.isTruthy(generator);
78
- });
79
- }
80
- static assertProxyEquals(client, id) {
81
- return __awaiter(this, void 0, void 0, function* () {
82
- let passedSource;
83
- yield client.on('whoami::v2020_12_25', ({ source }) => {
84
- passedSource = source;
85
- return {
86
- type: 'anonymous',
87
- auth: {},
88
- };
89
- });
90
- yield client.emit('whoami::v2020_12_25');
91
- assert.isEqual(passedSource.proxyToken, id);
92
- yield client.emitAndFlattenResponses('whoami::v2020_12_25');
93
- assert.isEqual(passedSource.proxyToken, id);
94
- });
95
- }
96
- static getDecorator() {
97
- return ClientProxyDecorator.getInstance();
98
- }
99
- };
100
- __decorate([
101
- test()
102
- ], DecoratingEmitToPassThroughProxyTest, "sharesInstance", null);
103
- __decorate([
104
- test()
105
- ], DecoratingEmitToPassThroughProxyTest, "canClearInstance", null);
106
- __decorate([
107
- test()
108
- ], DecoratingEmitToPassThroughProxyTest, "canGetAndSetProxyGenerator", null);
109
- __decorate([
110
- test('can set token to 234', '234'),
111
- test('can set token to waka', 'waka')
112
- ], DecoratingEmitToPassThroughProxyTest, "canSetDefaultProxyPassThrough", null);
113
- __decorate([
114
- test()
115
- ], DecoratingEmitToPassThroughProxyTest, "canSetTokenWhileDecorating", null);
116
- __decorate([
117
- test()
118
- ], DecoratingEmitToPassThroughProxyTest, "decoratorPassProps", null);
119
- __decorate([
120
- test()
121
- ], DecoratingEmitToPassThroughProxyTest, "instanceIsSameEachTest", null);
122
- __decorate([
123
- test()
124
- ], DecoratingEmitToPassThroughProxyTest, "loginSetsUpProxyTokenGenerator", null);
125
- DecoratingEmitToPassThroughProxyTest = __decorate([
126
- login(DEMO_NUMBER)
127
- ], DecoratingEmitToPassThroughProxyTest);
128
- export default DecoratingEmitToPassThroughProxyTest;
@@ -1,4 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
2
- export default class DelaysConnectWhenOnlyUsingLoginDecoratorTest extends AbstractSpruceFixtureTest {
3
- protected static globalEmitterListeningToAuthenticate(): Promise<void>;
4
- }
@@ -1,40 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
- step((generator = generator.apply(thisArg, _arguments || [])).next());
14
- });
15
- };
16
- import { MercuryTestClient } from '@sprucelabs/mercury-client';
17
- import { assert, test } from '@sprucelabs/test-utils';
18
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
19
- import { DEMO_NUMBER } from '../../tests/constants.js';
20
- import fake from '../../tests/decorators/fake.js';
21
- process.env.SKILL_ID = 'yay';
22
- process.env.SKILL_API_KEY = 'yay';
23
- let DelaysConnectWhenOnlyUsingLoginDecoratorTest = class DelaysConnectWhenOnlyUsingLoginDecoratorTest extends AbstractSpruceFixtureTest {
24
- static globalEmitterListeningToAuthenticate() {
25
- return __awaiter(this, void 0, void 0, function* () {
26
- const emitter = MercuryTestClient.getInternalEmitter({
27
- eventSignatures: {},
28
- });
29
- //@ts-ignore
30
- assert.isTruthy(emitter.listenersByEvent['authenticate::v2020_12_25']);
31
- });
32
- }
33
- };
34
- __decorate([
35
- test()
36
- ], DelaysConnectWhenOnlyUsingLoginDecoratorTest, "globalEmitterListeningToAuthenticate", null);
37
- DelaysConnectWhenOnlyUsingLoginDecoratorTest = __decorate([
38
- fake.login(DEMO_NUMBER)
39
- ], DelaysConnectWhenOnlyUsingLoginDecoratorTest);
40
- export default DelaysConnectWhenOnlyUsingLoginDecoratorTest;
@@ -1,5 +0,0 @@
1
- import { AbstractSpruceFixtureTest } from '../..';
2
- export default class DisablingSchemaValidationOnTestTest extends AbstractSpruceFixtureTest {
3
- protected static shouldValidateIsFalse(): void;
4
- protected static revertsBeforeEachTest(): void;
5
- }
@@ -1,23 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { test, assert } from '@sprucelabs/test-utils';
8
- import { AbstractSpruceFixtureTest } from '../../index.js';
9
- export default class DisablingSchemaValidationOnTestTest extends AbstractSpruceFixtureTest {
10
- static shouldValidateIsFalse() {
11
- assert.isEqual(process.env.SHOULD_VALIDATE_SCHEMAS_ON_BOOT, 'false');
12
- process.env.SHOULD_VALIDATE_SCHEMAS_ON_BOOT = 'true';
13
- }
14
- static revertsBeforeEachTest() {
15
- assert.isEqual(process.env.SHOULD_VALIDATE_SCHEMAS_ON_BOOT, 'false');
16
- }
17
- }
18
- __decorate([
19
- test()
20
- ], DisablingSchemaValidationOnTestTest, "shouldValidateIsFalse", null);
21
- __decorate([
22
- test()
23
- ], DisablingSchemaValidationOnTestTest, "revertsBeforeEachTest", null);
@@ -1,8 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
2
- export default class DoesntResetAccountIfOnlySeedingLocally extends AbstractSpruceFixtureTest {
3
- protected static beforeEach(): Promise<void>;
4
- protected static doesNotResetAccount(): void;
5
- protected static doesNotResetBefore(): Promise<void>;
6
- protected static resetAfterSeedingOrgs(): void;
7
- protected static shouldNotHaveHit(): void;
8
- }
@@ -1,80 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
- step((generator = generator.apply(thisArg, _arguments || [])).next());
14
- });
15
- };
16
- import { MercuryTestClient } from '@sprucelabs/mercury-client';
17
- import { coreEventContracts } from '@sprucelabs/mercury-core-events';
18
- import { assert, test } from '@sprucelabs/test-utils';
19
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
20
- import { DEMO_NUMBER_ACCOUNT_RESET } from '../../tests/constants.js';
21
- import login from '../../tests/decorators/login.js';
22
- import seed from '../../tests/decorators/seed.js';
23
- import MercuryFixture from '../../tests/fixtures/MercuryFixture.js';
24
- import StoreFixture from '../../tests/fixtures/StoreFixture.js';
25
- // eslint-disable-next-line spruce/prohibit-import-from-build-folder
26
- import GoodStore from '../testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js';
27
- MercuryFixture.setShouldRequireLocalListeners(false);
28
- let hitCount = 0;
29
- MercuryTestClient.reset = () => { };
30
- //@ts-ignore
31
- const emitter = MercuryTestClient.getInternalEmitter(coreEventContracts[0]);
32
- void emitter.on('list-organizations::v2020_12_25', () => {
33
- hitCount++;
34
- return {
35
- organizations: [],
36
- };
37
- });
38
- let DoesntResetAccountIfOnlySeedingLocally = class DoesntResetAccountIfOnlySeedingLocally extends AbstractSpruceFixtureTest {
39
- static beforeEach() {
40
- const _super = Object.create(null, {
41
- beforeEach: { get: () => super.beforeEach }
42
- });
43
- return __awaiter(this, void 0, void 0, function* () {
44
- yield _super.beforeEach.call(this);
45
- });
46
- }
47
- static doesNotResetAccount() {
48
- assert.isEqual(hitCount, 1);
49
- }
50
- static doesNotResetBefore() {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- assert.isEqual(hitCount, 1);
53
- });
54
- }
55
- static resetAfterSeedingOrgs() {
56
- assert.isEqual(hitCount, 2);
57
- }
58
- static shouldNotHaveHit() {
59
- assert.isEqual(hitCount, 2);
60
- }
61
- };
62
- __decorate([
63
- test(),
64
- seed('good', 5)
65
- ], DoesntResetAccountIfOnlySeedingLocally, "doesNotResetAccount", null);
66
- __decorate([
67
- test(),
68
- seed('organizations', 1)
69
- ], DoesntResetAccountIfOnlySeedingLocally, "doesNotResetBefore", null);
70
- __decorate([
71
- test()
72
- ], DoesntResetAccountIfOnlySeedingLocally, "resetAfterSeedingOrgs", null);
73
- __decorate([
74
- test()
75
- ], DoesntResetAccountIfOnlySeedingLocally, "shouldNotHaveHit", null);
76
- DoesntResetAccountIfOnlySeedingLocally = __decorate([
77
- login(DEMO_NUMBER_ACCOUNT_RESET)
78
- ], DoesntResetAccountIfOnlySeedingLocally);
79
- export default DoesntResetAccountIfOnlySeedingLocally;
80
- StoreFixture.setStore('good', GoodStore);
@@ -1,12 +0,0 @@
1
- import { AbstractSpruceFixtureTest } from '../..';
2
- export default class FakingErrorResponsesTest extends AbstractSpruceFixtureTest {
3
- private static client;
4
- protected static beforeEach(): Promise<void>;
5
- protected static throwsWhenFakingResponse(fqen: any, targetAndPayload: any): Promise<void>;
6
- protected static onClearsPreviousListeners(fqen: any): Promise<void>;
7
- protected static throwsEvenWhenFakingWithPreviousListeners(): Promise<void>;
8
- protected static fakeEventsAreClearedFromPreviousTest(): Promise<void>;
9
- protected static canFakeEventWithNoResponse(): Promise<void>;
10
- protected static canCustomizeTheErrorPassedIn(): Promise<void>;
11
- private static assertResponseIsFakeEventError;
12
- }
@@ -1,148 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
- step((generator = generator.apply(thisArg, _arguments || [])).next());
14
- });
15
- };
16
- import { eventAssertUtil } from '@sprucelabs/spruce-event-utils';
17
- import { test, assert } from '@sprucelabs/test-utils';
18
- import { AbstractSpruceFixtureTest } from '../../index.js';
19
- import SpruceError from '../../errors/SpruceError.js';
20
- import eventFaker from '../../tests/eventFaker.js';
21
- export default class FakingErrorResponsesTest extends AbstractSpruceFixtureTest {
22
- static beforeEach() {
23
- const _super = Object.create(null, {
24
- beforeEach: { get: () => super.beforeEach }
25
- });
26
- return __awaiter(this, void 0, void 0, function* () {
27
- yield _super.beforeEach.call(this);
28
- this.client = (yield this.mercury.connectToApi());
29
- });
30
- }
31
- static throwsWhenFakingResponse(fqen, targetAndPayload) {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- yield eventFaker.makeEventThrow(fqen);
34
- yield this.assertResponseIsFakeEventError(fqen, targetAndPayload);
35
- });
36
- }
37
- static onClearsPreviousListeners(fqen) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- let wasOldHit = false;
40
- let wasNewHit = false;
41
- if (!this.client.doesHandleEvent(fqen)) {
42
- this.client.mixinContract({
43
- eventSignatures: {
44
- [fqen]: {},
45
- },
46
- });
47
- }
48
- yield this.client.on(fqen, () => {
49
- wasOldHit = true;
50
- });
51
- //@ts-ignore
52
- yield eventFaker.on(fqen, () => {
53
- wasNewHit = true;
54
- return {
55
- auth: {},
56
- type: 'anonymous',
57
- };
58
- });
59
- assert.isFalse(wasNewHit);
60
- yield this.client.emit(fqen);
61
- assert.isFalse(wasOldHit);
62
- assert.isTrue(wasNewHit);
63
- });
64
- }
65
- static throwsEvenWhenFakingWithPreviousListeners() {
66
- return __awaiter(this, void 0, void 0, function* () {
67
- //@ts-ignore
68
- yield this.client.on('whoami::v2020_12_25', () => __awaiter(this, void 0, void 0, function* () {
69
- return {};
70
- }));
71
- yield eventFaker.makeEventThrow('whoami::v2020_12_25');
72
- yield this.assertResponseIsFakeEventError('whoami::v2020_12_25');
73
- });
74
- }
75
- static fakeEventsAreClearedFromPreviousTest() {
76
- return __awaiter(this, void 0, void 0, function* () {
77
- yield this.client.on('request-pin::v2020_12_25', () => __awaiter(this, void 0, void 0, function* () {
78
- return {
79
- challenge: 'aoeu',
80
- };
81
- }));
82
- yield this.client.emitAndFlattenResponses('request-pin::v2020_12_25', {
83
- payload: {
84
- phone: '+555-000-0001',
85
- },
86
- });
87
- });
88
- }
89
- static canFakeEventWithNoResponse() {
90
- return __awaiter(this, void 0, void 0, function* () {
91
- const fqen = 'test-burrito::v1';
92
- this.client.mixinContract({
93
- eventSignatures: {
94
- [fqen]: {
95
- isGlobal: true,
96
- },
97
- },
98
- });
99
- yield eventFaker.handleReactiveEvent(fqen);
100
- const results = yield this.client.emit(fqen);
101
- assert.isEqual(results.totalErrors, 0);
102
- });
103
- }
104
- static canCustomizeTheErrorPassedIn() {
105
- return __awaiter(this, void 0, void 0, function* () {
106
- var _a;
107
- const error = new SpruceError({
108
- code: 'INVALID_TARGET',
109
- });
110
- yield eventFaker.makeEventThrow('whoami::v2020_12_25', error);
111
- const results = yield this.client.emit('whoami::v2020_12_25');
112
- assert.isEqualDeep((_a = results.responses[0].errors) === null || _a === void 0 ? void 0 : _a[0], error);
113
- });
114
- }
115
- static assertResponseIsFakeEventError(fqen, targetAndPayload) {
116
- return __awaiter(this, void 0, void 0, function* () {
117
- const results = yield this.client.emit(fqen, targetAndPayload);
118
- assert.isEqual(results.totalErrors, 1);
119
- eventAssertUtil.assertErrorFromResponse(results, 'FAKE_EVENT_ERROR', {
120
- fqen,
121
- });
122
- });
123
- }
124
- }
125
- __decorate([
126
- test('faking whoami::v2020_12_25', 'whoami::v2020_12_25'),
127
- test('faking request-pin::v2020_12_25', 'request-pin::v2020_12_25', {
128
- payload: {
129
- phone: '+555-000-0001',
130
- },
131
- })
132
- ], FakingErrorResponsesTest, "throwsWhenFakingResponse", null);
133
- __decorate([
134
- test('on clears previous listeners 1', 'whoami::v2020_12_25'),
135
- test('on clears previous listeners 2', 'what-the::v2020_12_25')
136
- ], FakingErrorResponsesTest, "onClearsPreviousListeners", null);
137
- __decorate([
138
- test()
139
- ], FakingErrorResponsesTest, "throwsEvenWhenFakingWithPreviousListeners", null);
140
- __decorate([
141
- test()
142
- ], FakingErrorResponsesTest, "fakeEventsAreClearedFromPreviousTest", null);
143
- __decorate([
144
- test()
145
- ], FakingErrorResponsesTest, "canFakeEventWithNoResponse", null);
146
- __decorate([
147
- test()
148
- ], FakingErrorResponsesTest, "canCustomizeTheErrorPassedIn", null);
@@ -1,7 +0,0 @@
1
- import AbstractSpruceTest from '@sprucelabs/test-utils';
2
- export default class FixtureFactoryTest extends AbstractSpruceTest {
3
- protected static throwsWithBadFixture(): void;
4
- protected static getsFixture(name: string, Class: any): void;
5
- private static Fixture;
6
- protected static destroyDisconnectsClient(): Promise<void>;
7
- }
@@ -1,61 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
- step((generator = generator.apply(thisArg, _arguments || [])).next());
14
- });
15
- };
16
- import AbstractSpruceTest, { test, assert } from '@sprucelabs/test-utils';
17
- import { errorAssert } from '@sprucelabs/test-utils';
18
- import FixtureFactory from '../../tests/fixtures/FixtureFactory.js';
19
- import MercuryFixture from '../../tests/fixtures/MercuryFixture.js';
20
- import OrganizationFixture from '../../tests/fixtures/OrganizationFixture.js';
21
- import PersonFixture from '../../tests/fixtures/PersonFixture.js';
22
- import SkillFixture from '../../tests/fixtures/SkillFixture.js';
23
- export default class FixtureFactoryTest extends AbstractSpruceTest {
24
- static throwsWithBadFixture() {
25
- //@ts-ignore
26
- const err = assert.doesThrow(() => this.Fixture().Fixture('taco'));
27
- errorAssert.assertError(err, 'INVALID_FIXTURE', {
28
- suppliedName: 'taco',
29
- });
30
- }
31
- static getsFixture(name, Class) {
32
- //@ts-ignore
33
- const fixture = this.Fixture().Fixture(name);
34
- assert.isTrue(fixture instanceof Class);
35
- }
36
- static Fixture() {
37
- return new FixtureFactory({ cwd: this.cwd });
38
- }
39
- static destroyDisconnectsClient() {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- const { client } = yield this.Fixture()
42
- .Fixture('person')
43
- .loginAsDemoPerson();
44
- assert.isTrue(client.isConnected());
45
- yield FixtureFactory.destroy();
46
- assert.isFalse(client.isConnected());
47
- });
48
- }
49
- }
50
- __decorate([
51
- test()
52
- ], FixtureFactoryTest, "throwsWithBadFixture", null);
53
- __decorate([
54
- test('person fixture', 'person', PersonFixture),
55
- test('mercury fixture', 'mercury', MercuryFixture),
56
- test('org fixture', 'organization', OrganizationFixture),
57
- test('skill fixture', 'skill', SkillFixture)
58
- ], FixtureFactoryTest, "getsFixture", null);
59
- __decorate([
60
- test()
61
- ], FixtureFactoryTest, "destroyDisconnectsClient", null);
@@ -1,17 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
2
- export default class LocationFixtureTest extends AbstractSpruceFixtureTest {
3
- protected static beforeEach(): Promise<void>;
4
- protected static canCreateWithSpecificOrg(): Promise<void>;
5
- protected static canCreatLocationWithNoParams(): Promise<void>;
6
- protected static isNotPartOfLocationToStart(): Promise<void>;
7
- protected static uniqueLocationName(): Promise<void>;
8
- protected static locationCountResetBeforeEach(): Promise<void>;
9
- protected static canAddPersonToLocation(): Promise<void>;
10
- protected static throwsWhenTryingToRemovePersonWithBadIds(): Promise<void>;
11
- protected static canRemoveRole(): Promise<void>;
12
- private static isPersonPartOfLocation;
13
- protected static seedLocationAndAddPerson(): Promise<{
14
- location: Pick<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>, "id" | "address" | "phone" | "name" | "organizationId" | "timezone" | "dateCreated" | "dateDeleted" | "isPublic" | "slug" | "num">;
15
- person: import("@sprucelabs/mercury-types").SpruceSchemas.Spruce.v2020_07_22.Person;
16
- }>;
17
- }