@sprucelabs/spruce-test-fixtures 62.2.24 → 62.2.26

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 (291) hide show
  1. package/build/esm/index.d.ts +1 -1
  2. package/build/esm/index.js +1 -1
  3. package/build/esm/tests/fixtures/ViewFixture.d.ts +1 -1
  4. package/build/esm/tests/routers/TestRouter.d.ts +1 -1
  5. package/build/esm/tests/routers/TestRouter.js +1 -1
  6. package/build/index.d.ts +1 -1
  7. package/build/index.js +1 -1
  8. package/build/tests/fixtures/ViewFixture.d.ts +1 -1
  9. package/build/tests/routers/TestRouter.d.ts +1 -1
  10. package/build/tests/routers/TestRouter.js +1 -1
  11. package/package.json +19 -19
  12. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
  13. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -112
  14. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
  15. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -34
  16. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
  17. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -26
  18. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
  19. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -69
  20. package/build/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
  21. package/build/__tests__/behavioral/FakingEventResponses.test.js +0 -126
  22. package/build/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
  23. package/build/__tests__/behavioral/FixtureFactory.test.js +0 -79
  24. package/build/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
  25. package/build/__tests__/behavioral/LocationFixture.test.js +0 -144
  26. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
  27. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -95
  28. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
  29. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -35
  30. package/build/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
  31. package/build/__tests__/behavioral/MercuryFixture.test.js +0 -187
  32. package/build/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
  33. package/build/__tests__/behavioral/OrganizationFixture.test.js +0 -333
  34. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
  35. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -21
  36. package/build/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
  37. package/build/__tests__/behavioral/PersonFixture.test.js +0 -225
  38. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
  39. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -95
  40. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
  41. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -67
  42. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
  43. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -44
  44. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
  45. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -55
  46. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
  47. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -137
  48. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
  49. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -54
  50. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
  51. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -40
  52. package/build/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
  53. package/build/__tests__/behavioral/RoleFixture.test.js +0 -118
  54. package/build/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
  55. package/build/__tests__/behavioral/SkillFixture.test.js +0 -118
  56. package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
  57. package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -41
  58. package/build/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
  59. package/build/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -59
  60. package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
  61. package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -34
  62. package/build/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
  63. package/build/__tests__/behavioral/databases/DummyStore.js +0 -36
  64. package/build/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
  65. package/build/__tests__/behavioral/databases/StoreFixture.test.js +0 -156
  66. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
  67. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -73
  68. package/build/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
  69. package/build/__tests__/behavioral/faking/FakeDecorator.test.js +0 -421
  70. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
  71. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -23
  72. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
  73. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -27
  74. package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
  75. package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -93
  76. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
  77. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -56
  78. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
  79. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -141
  80. package/build/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
  81. package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -35
  82. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
  83. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -42
  84. package/build/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
  85. package/build/__tests__/behavioral/faking/FakingLocations.test.js +0 -45
  86. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
  87. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -140
  88. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
  89. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -174
  90. package/build/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
  91. package/build/__tests__/behavioral/faking/UpdatePerson.test.js +0 -32
  92. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
  93. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -321
  94. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
  95. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -48
  96. package/build/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
  97. package/build/__tests__/behavioral/faking/WhoAmI.test.js +0 -105
  98. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
  99. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -76
  100. package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
  101. package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -272
  102. package/build/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
  103. package/build/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -35
  104. package/build/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
  105. package/build/__tests__/behavioral/seeding/SeedingData.test.js +0 -271
  106. package/build/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
  107. package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -266
  108. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
  109. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -117
  110. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
  111. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -55
  112. package/build/__tests__/behavioral/views/Routing.test.d.ts +0 -36
  113. package/build/__tests__/behavioral/views/Routing.test.js +0 -177
  114. package/build/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
  115. package/build/__tests__/behavioral/views/TestingScope.test.js +0 -197
  116. package/build/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
  117. package/build/__tests__/behavioral/views/ViewPlugins.test.js +0 -83
  118. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
  119. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -55
  120. package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
  121. package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -761
  122. package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
  123. package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -29
  124. package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
  125. package/build/__tests__/support/AbstractFakeDecoratorTest.js +0 -27
  126. package/build/__tests__/support/EventFaker.d.ts +0 -5
  127. package/build/__tests__/support/EventFaker.js +0 -36
  128. package/build/__tests__/support/RandomViewPlugin.d.ts +0 -2
  129. package/build/__tests__/support/RandomViewPlugin.js +0 -5
  130. package/build/__tests__/support/RandomViewPlugin2.d.ts +0 -2
  131. package/build/__tests__/support/RandomViewPlugin2.js +0 -5
  132. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.d.ts +0 -5
  133. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.js +0 -9
  134. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
  135. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -33
  136. package/build/__tests__/testDirsAndFiles/one-good-store-skill/src/.spruce/settings.json +0 -6
  137. package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.d.ts +0 -6
  138. package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.js +0 -11
  139. package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.d.ts +0 -6
  140. package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.js +0 -11
  141. package/build/__tests__/testDirsAndFiles/skill/build/.spruce/views/views.js +0 -18
  142. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
  143. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -11
  144. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
  145. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -19
  146. package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
  147. package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -31
  148. package/build/__tests__/testDirsAndFiles/skill/package.json +0 -5
  149. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/settings.json +0 -6
  150. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.d.ts +0 -7
  151. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.js +0 -17
  152. package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
  153. package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -11
  154. package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
  155. package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -31
  156. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
  157. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -128
  158. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
  159. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -40
  160. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
  161. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -23
  162. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
  163. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -80
  164. package/build/esm/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
  165. package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +0 -148
  166. package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
  167. package/build/esm/__tests__/behavioral/FixtureFactory.test.js +0 -61
  168. package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
  169. package/build/esm/__tests__/behavioral/LocationFixture.test.js +0 -173
  170. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
  171. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -113
  172. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
  173. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -41
  174. package/build/esm/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
  175. package/build/esm/__tests__/behavioral/MercuryFixture.test.js +0 -223
  176. package/build/esm/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
  177. package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +0 -389
  178. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
  179. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -18
  180. package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
  181. package/build/esm/__tests__/behavioral/PersonFixture.test.js +0 -232
  182. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
  183. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -112
  184. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
  185. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -84
  186. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
  187. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -55
  188. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
  189. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -72
  190. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
  191. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -146
  192. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
  193. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -66
  194. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
  195. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -51
  196. package/build/esm/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
  197. package/build/esm/__tests__/behavioral/RoleFixture.test.js +0 -143
  198. package/build/esm/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
  199. package/build/esm/__tests__/behavioral/SkillFixture.test.js +0 -141
  200. package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
  201. package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -53
  202. package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
  203. package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -48
  204. package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
  205. package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -28
  206. package/build/esm/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
  207. package/build/esm/__tests__/behavioral/databases/DummyStore.js +0 -43
  208. package/build/esm/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
  209. package/build/esm/__tests__/behavioral/databases/StoreFixture.test.js +0 -164
  210. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
  211. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -89
  212. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
  213. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +0 -482
  214. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
  215. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -28
  216. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
  217. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -32
  218. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
  219. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -82
  220. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
  221. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -70
  222. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
  223. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -165
  224. package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
  225. package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -43
  226. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
  227. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -55
  228. package/build/esm/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
  229. package/build/esm/__tests__/behavioral/faking/FakingLocations.test.js +0 -55
  230. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
  231. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -175
  232. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
  233. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -214
  234. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
  235. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +0 -38
  236. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
  237. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -360
  238. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
  239. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -31
  240. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
  241. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +0 -142
  242. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
  243. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -94
  244. package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
  245. package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -324
  246. package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
  247. package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -43
  248. package/build/esm/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
  249. package/build/esm/__tests__/behavioral/seeding/SeedingData.test.js +0 -314
  250. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
  251. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -322
  252. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
  253. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -138
  254. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
  255. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -70
  256. package/build/esm/__tests__/behavioral/views/Routing.test.d.ts +0 -36
  257. package/build/esm/__tests__/behavioral/views/Routing.test.js +0 -212
  258. package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
  259. package/build/esm/__tests__/behavioral/views/TestingScope.test.js +0 -238
  260. package/build/esm/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
  261. package/build/esm/__tests__/behavioral/views/ViewPlugins.test.js +0 -103
  262. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
  263. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -64
  264. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
  265. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -856
  266. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
  267. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -39
  268. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
  269. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +0 -34
  270. package/build/esm/__tests__/support/EventFaker.d.ts +0 -5
  271. package/build/esm/__tests__/support/EventFaker.js +0 -45
  272. package/build/esm/__tests__/support/RandomViewPlugin.d.ts +0 -2
  273. package/build/esm/__tests__/support/RandomViewPlugin.js +0 -2
  274. package/build/esm/__tests__/support/RandomViewPlugin2.d.ts +0 -2
  275. package/build/esm/__tests__/support/RandomViewPlugin2.js +0 -2
  276. package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
  277. package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -41
  278. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
  279. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -9
  280. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
  281. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -28
  282. package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
  283. package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -26
  284. package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
  285. package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -9
  286. package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
  287. package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -26
  288. /package/build/{__tests__/support → esm/tests}/FakeThemeManager.d.ts +0 -0
  289. /package/build/esm/{__tests__/support → tests}/FakeThemeManager.js +0 -0
  290. /package/build/{esm/__tests__/support → tests}/FakeThemeManager.d.ts +0 -0
  291. /package/build/{__tests__/support → tests}/FakeThemeManager.js +0 -0
@@ -1,143 +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 { eventResponseUtil } from '@sprucelabs/spruce-event-utils';
17
- import { assert, test } from '@sprucelabs/test-utils';
18
- import { errorAssert } from '@sprucelabs/test-utils';
19
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
20
- import { DEMO_NUMBER_ROLE_FIXTURE } from '../../tests/constants.js';
21
- import fake from '../../tests/decorators/fake.js';
22
- import seed from '../../tests/decorators/seed.js';
23
- let RoleFixtureTest = class RoleFixtureTest extends AbstractSpruceFixtureTest {
24
- static beforeEach() {
25
- const _super = Object.create(null, {
26
- beforeEach: { get: () => super.beforeEach }
27
- });
28
- return __awaiter(this, void 0, void 0, function* () {
29
- yield _super.beforeEach.call(this);
30
- this.fixture = this.Fixture('role');
31
- this.client = fake.getClient();
32
- });
33
- }
34
- static hasRoleFixture() {
35
- assert.isTruthy(this.fixture);
36
- }
37
- static cantListRolesWithoutOrg() {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- const err = yield assert.doesThrowAsync(() => this.fixture.listRoles());
40
- errorAssert.assertError(err, 'MISSING_PARAMETERS', {
41
- parameters: ['organizationId'],
42
- });
43
- });
44
- }
45
- static listsValidRoles() {
46
- return __awaiter(this, void 0, void 0, function* () {
47
- const roles = yield this.fixture.listRoles();
48
- assert.isArray(roles);
49
- assert.isAbove(roles.length, 0);
50
- for (const role of roles) {
51
- const results = yield this.client.emit('get-role::v2020_12_25', {
52
- target: {
53
- roleId: role.id,
54
- },
55
- });
56
- eventResponseUtil.getFirstResponseOrThrow(results);
57
- }
58
- });
59
- }
60
- static listsWorkingRolesByDefault() {
61
- return __awaiter(this, void 0, void 0, function* () {
62
- const allRoles = yield this.listRoles();
63
- const expectedRoles = allRoles.filter((role) => role.base !== 'anonymous' && role.base !== 'loggedIn');
64
- yield this.assertListedRolesMatchExpected(expectedRoles);
65
- });
66
- }
67
- static listMetaRolesWithOptions() {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- const allRoles = yield this.listRoles();
70
- yield this.assertListedRolesMatchExpected(allRoles, {
71
- shouldIncludeMetaRoles: true,
72
- });
73
- });
74
- }
75
- static canPassOwnOrg() {
76
- return __awaiter(this, void 0, void 0, function* () {
77
- const orgs = yield this.organizations.listOrganizations();
78
- const org = orgs[2];
79
- const roles = yield this.fixture.listRoles({ organizationId: org.id });
80
- assert.isEqual(roles[0].organizationId, org.id);
81
- });
82
- }
83
- static getNewestOrg() {
84
- return __awaiter(this, void 0, void 0, function* () {
85
- const org = yield this.organizations.getNewestOrganization();
86
- assert.isTruthy(org, `You gotta @seed('organizations',1) to continue.`);
87
- return org;
88
- });
89
- }
90
- static assertListedRolesMatchExpected(expectedRoles, options) {
91
- return __awaiter(this, void 0, void 0, function* () {
92
- const roles = yield this.fixture.listRoles(options);
93
- function sort(a, b) {
94
- return a.name > b.name ? 1 : -1;
95
- }
96
- roles.sort(sort);
97
- expectedRoles.sort(sort);
98
- assert.isEqualDeep(roles, expectedRoles);
99
- });
100
- }
101
- static listRoles() {
102
- return __awaiter(this, void 0, void 0, function* () {
103
- const org = yield this.getNewestOrg();
104
- const roleResults = yield this.client.emit('list-roles::v2020_12_25', {
105
- target: {
106
- organizationId: org.id,
107
- },
108
- payload: {
109
- shouldIncludePrivateRoles: true,
110
- shouldIncludeMetaRoles: true,
111
- },
112
- });
113
- const { roles: allRoles } = eventResponseUtil.getFirstResponseOrThrow(roleResults);
114
- return allRoles;
115
- });
116
- }
117
- };
118
- __decorate([
119
- test()
120
- ], RoleFixtureTest, "hasRoleFixture", null);
121
- __decorate([
122
- test()
123
- ], RoleFixtureTest, "cantListRolesWithoutOrg", null);
124
- __decorate([
125
- test(),
126
- seed('organizations', 1)
127
- ], RoleFixtureTest, "listsValidRoles", null);
128
- __decorate([
129
- test(),
130
- seed('organizations', 1)
131
- ], RoleFixtureTest, "listsWorkingRolesByDefault", null);
132
- __decorate([
133
- test(),
134
- seed('organizations', 1)
135
- ], RoleFixtureTest, "listMetaRolesWithOptions", null);
136
- __decorate([
137
- test(),
138
- seed('organizations', 3)
139
- ], RoleFixtureTest, "canPassOwnOrg", null);
140
- RoleFixtureTest = __decorate([
141
- fake.login(DEMO_NUMBER_ROLE_FIXTURE)
142
- ], RoleFixtureTest);
143
- export default RoleFixtureTest;
@@ -1,13 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
2
- export default class SkillFixtureTest extends AbstractSpruceFixtureTest {
3
- private static fixture;
4
- protected static beforeEach(): Promise<void>;
5
- protected static canCreateSkillFixture(): Promise<void>;
6
- protected static canSeedSkill(): Promise<void>;
7
- protected static cleansUpSkillsAndNotCrashWithMultileDestroys(): Promise<void>;
8
- protected static cantLoginAsCurrentSkillIfSkillNotConfigured(): Promise<void>;
9
- protected static cantLoginAsCurrentSkillIfSkillNotConfiguredWithApiKey(): Promise<void>;
10
- protected static canLoginAsCurrentSkill(): Promise<void>;
11
- protected static shouldUnRegisterDemoSkills(): Promise<void>;
12
- protected static canPassThroughPersonFixture(): void;
13
- }
@@ -1,141 +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, eventResponseUtil, } from '@sprucelabs/spruce-event-utils';
17
- import { test, assert } from '@sprucelabs/test-utils';
18
- import { errorAssert } from '@sprucelabs/test-utils';
19
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
20
- import { DEMO_NUMBER_SKILL_FIXTURE } from '../../tests/constants.js';
21
- import login from '../../tests/decorators/login.js';
22
- import MercuryFixture from '../../tests/fixtures/MercuryFixture.js';
23
- MercuryFixture.setShouldRequireLocalListeners(false);
24
- let SkillFixtureTest = class SkillFixtureTest extends AbstractSpruceFixtureTest {
25
- static beforeEach() {
26
- const _super = Object.create(null, {
27
- beforeEach: { get: () => super.beforeEach }
28
- });
29
- return __awaiter(this, void 0, void 0, function* () {
30
- yield _super.beforeEach.call(this);
31
- this.fixture = this.Fixture('skill');
32
- delete process.env.SKILL_ID;
33
- delete process.env.SKILL_API_KEY;
34
- });
35
- }
36
- static canCreateSkillFixture() {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- assert.isTruthy(this.fixture);
39
- });
40
- }
41
- static canSeedSkill() {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- const skill = yield this.fixture.seedDemoSkill({
44
- name: 'skill1',
45
- });
46
- assert.isTruthy(skill);
47
- assert.isEqual(skill.name, 'skill1');
48
- });
49
- }
50
- static cleansUpSkillsAndNotCrashWithMultileDestroys() {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- const skill = yield this.fixture.seedDemoSkill({
53
- name: 'skill1',
54
- });
55
- yield this.fixture.destroy();
56
- yield this.fixture.destroy();
57
- const client = yield this.Fixture('mercury').connectToApi();
58
- const results = yield client.emit('get-skill::v2020_12_25', {
59
- target: {
60
- skillId: skill.id,
61
- },
62
- });
63
- eventAssertUtil.assertErrorFromResponse(results, 'INVALID_TARGET');
64
- });
65
- }
66
- static cantLoginAsCurrentSkillIfSkillNotConfigured() {
67
- return __awaiter(this, void 0, void 0, function* () {
68
- const err = yield assert.doesThrowAsync(() => this.fixture.loginAsCurrentSkill());
69
- errorAssert.assertError(err, 'MISSING_PARAMETERS', {
70
- parameters: ['env.SKILL_ID', 'env.SKILL_API_KEY'],
71
- });
72
- });
73
- }
74
- static cantLoginAsCurrentSkillIfSkillNotConfiguredWithApiKey() {
75
- return __awaiter(this, void 0, void 0, function* () {
76
- process.env.SKILL_ID = '123';
77
- const err = yield assert.doesThrowAsync(() => this.fixture.loginAsCurrentSkill());
78
- errorAssert.assertError(err, 'MISSING_PARAMETERS', {
79
- parameters: ['env.SKILL_API_KEY'],
80
- });
81
- });
82
- }
83
- static canLoginAsCurrentSkill() {
84
- return __awaiter(this, void 0, void 0, function* () {
85
- const { skill: demoSkill } = yield this.fixture.loginAsDemoSkill({
86
- name: 'Demo me!',
87
- });
88
- process.env.SKILL_ID = demoSkill.id;
89
- process.env.SKILL_API_KEY = demoSkill.apiKey;
90
- const { skill, client } = yield this.fixture.loginAsCurrentSkill();
91
- assert.isTruthy(skill);
92
- assert.isTruthy(client);
93
- assert.isEqual(skill.id, demoSkill.id);
94
- assert.isEqual(skill.apiKey, demoSkill.apiKey);
95
- });
96
- }
97
- static shouldUnRegisterDemoSkills() {
98
- return __awaiter(this, void 0, void 0, function* () {
99
- const { client } = yield this.fixture.loginAsDemoSkill({
100
- name: 'Demo me!',
101
- });
102
- yield this.fixture.destroy();
103
- const results = yield client.emit('whoami::v2020_12_25');
104
- assert.doesThrow(() => eventResponseUtil.getFirstResponseOrThrow(results));
105
- });
106
- }
107
- static canPassThroughPersonFixture() {
108
- const personFixture = this.Fixture('person');
109
- const fixture = this.Fixture('skill', { personFixture });
110
- //@ts-ignore
111
- assert.isEqual(fixture.personFixture, personFixture);
112
- }
113
- };
114
- __decorate([
115
- test()
116
- ], SkillFixtureTest, "canCreateSkillFixture", null);
117
- __decorate([
118
- test()
119
- ], SkillFixtureTest, "canSeedSkill", null);
120
- __decorate([
121
- test()
122
- ], SkillFixtureTest, "cleansUpSkillsAndNotCrashWithMultileDestroys", null);
123
- __decorate([
124
- test()
125
- ], SkillFixtureTest, "cantLoginAsCurrentSkillIfSkillNotConfigured", null);
126
- __decorate([
127
- test()
128
- ], SkillFixtureTest, "cantLoginAsCurrentSkillIfSkillNotConfiguredWithApiKey", null);
129
- __decorate([
130
- test()
131
- ], SkillFixtureTest, "canLoginAsCurrentSkill", null);
132
- __decorate([
133
- test()
134
- ], SkillFixtureTest, "shouldUnRegisterDemoSkills", null);
135
- __decorate([
136
- test()
137
- ], SkillFixtureTest, "canPassThroughPersonFixture", null);
138
- SkillFixtureTest = __decorate([
139
- login(DEMO_NUMBER_SKILL_FIXTURE)
140
- ], SkillFixtureTest);
141
- export default SkillFixtureTest;
@@ -1,7 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
2
- export default class CanUseStoresSetupInBeforeEachTest extends AbstractSpruceFixtureTest {
3
- private static goodStore;
4
- protected static beforeEach(): Promise<void>;
5
- protected static shouldNotLoseData(): Promise<void>;
6
- protected static shouldNotLoseData2(): Promise<void>;
7
- }
@@ -1,53 +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 AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
18
- import seed from '../../../tests/decorators/seed.js';
19
- import StoreFixture from '../../../tests/fixtures/StoreFixture.js';
20
- // eslint-disable-next-line spruce/prohibit-import-from-build-folder
21
- import GoodStore from '../../testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js';
22
- export default class CanUseStoresSetupInBeforeEachTest extends AbstractSpruceFixtureTest {
23
- static beforeEach() {
24
- const _super = Object.create(null, {
25
- beforeEach: { get: () => super.beforeEach }
26
- });
27
- return __awaiter(this, void 0, void 0, function* () {
28
- yield _super.beforeEach.call(this);
29
- this.goodStore = yield this.Fixture('store').Store('good');
30
- });
31
- }
32
- static shouldNotLoseData() {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- const count = yield this.goodStore.count({});
35
- assert.isEqual(count, 3);
36
- });
37
- }
38
- static shouldNotLoseData2() {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- const count = yield this.goodStore.count({});
41
- assert.isEqual(count, 10);
42
- });
43
- }
44
- }
45
- __decorate([
46
- test(),
47
- seed('good', 3)
48
- ], CanUseStoresSetupInBeforeEachTest, "shouldNotLoseData", null);
49
- __decorate([
50
- test(),
51
- seed('good', 10)
52
- ], CanUseStoresSetupInBeforeEachTest, "shouldNotLoseData2", null);
53
- StoreFixture.setStore('good', GoodStore);
@@ -1,7 +0,0 @@
1
- import AbstractSpruceTest from '@sprucelabs/test-utils';
2
- export default class StoreFixtureTest extends AbstractSpruceTest {
3
- private static fixture;
4
- protected static beforeEach(): Promise<void>;
5
- protected static canGetDatabaseFixture(): Promise<void>;
6
- protected static canConnectToDabatase(): Promise<void>;
7
- }
@@ -1,48 +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 { DatabaseFixture } from '@sprucelabs/data-stores';
17
- import AbstractSpruceTest, { assert, test } from '@sprucelabs/test-utils';
18
- import FixtureFactory from '../../../tests/fixtures/FixtureFactory.js';
19
- export default class StoreFixtureTest extends AbstractSpruceTest {
20
- static beforeEach() {
21
- const _super = Object.create(null, {
22
- beforeEach: { get: () => super.beforeEach }
23
- });
24
- return __awaiter(this, void 0, void 0, function* () {
25
- yield _super.beforeEach.call(this);
26
- this.fixture = new FixtureFactory({ cwd: this.cwd }).Fixture('database');
27
- });
28
- }
29
- static canGetDatabaseFixture() {
30
- return __awaiter(this, void 0, void 0, function* () {
31
- assert.isTruthy(this.fixture);
32
- });
33
- }
34
- static canConnectToDabatase() {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- const db = yield this.fixture.connectToDatabase();
37
- assert.isTrue(db.isConnected());
38
- yield DatabaseFixture.destroy();
39
- assert.isFalse(db.isConnected());
40
- });
41
- }
42
- }
43
- __decorate([
44
- test()
45
- ], StoreFixtureTest, "canGetDatabaseFixture", null);
46
- __decorate([
47
- test()
48
- ], StoreFixtureTest, "canConnectToDabatase", null);
@@ -1,5 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
2
- export default class DbResetsAsExpectedTest extends AbstractSpruceFixtureTest {
3
- protected static shouldBeReset(): void;
4
- protected static doesNothing(): void;
5
- }
@@ -1,28 +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 '../../../tests/AbstractSpruceFixtureTest.js';
9
- import seed from '../../../tests/decorators/seed.js';
10
- import StoreFixture from '../../../tests/fixtures/StoreFixture.js';
11
- // eslint-disable-next-line spruce/prohibit-import-from-build-folder
12
- import GoodStore from '../../testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js';
13
- //do not seed anything else here, this test is to ensure db settings are reset before any
14
- //seed is called
15
- export default class DbResetsAsExpectedTest extends AbstractSpruceFixtureTest {
16
- static shouldBeReset() {
17
- assert.isEqual(process.env.DB_NAME, 'memory');
18
- assert.isEqual(process.env.DB_CONNECTION_STRING, 'memory://');
19
- }
20
- static doesNothing() { }
21
- }
22
- __decorate([
23
- test()
24
- ], DbResetsAsExpectedTest, "shouldBeReset", null);
25
- __decorate([
26
- seed('good', 1)
27
- ], DbResetsAsExpectedTest, "doesNothing", null);
28
- StoreFixture.setStore('good', GoodStore);
@@ -1,55 +0,0 @@
1
- import { AbstractStore } from '@sprucelabs/data-stores';
2
- import { SpruceSchemas } from '@sprucelabs/mercury-types';
3
- import { StoreSeedOptions } from '../../../types/store.types';
4
- declare const dummySchema: {
5
- id: string;
6
- fields: {
7
- id: {
8
- type: "id";
9
- };
10
- };
11
- };
12
- type DummySchema = typeof dummySchema;
13
- export declare class DummyStore extends AbstractStore<DummySchema> {
14
- name: string;
15
- protected collectionName: string;
16
- protected createSchema: {
17
- id: string;
18
- fields: {
19
- id: {
20
- type: "id";
21
- };
22
- };
23
- };
24
- protected updateSchema: {
25
- id: string;
26
- fields: {
27
- id: {
28
- type: "id";
29
- };
30
- };
31
- };
32
- protected fullSchema: {
33
- id: string;
34
- fields: {
35
- id: {
36
- type: "id";
37
- };
38
- };
39
- };
40
- protected databaseSchema: {
41
- id: string;
42
- fields: {
43
- id: {
44
- type: "id";
45
- };
46
- };
47
- };
48
- static lastFakedOwner?: SpruceSchemas.Spruce.v2020_07_22.Person;
49
- static seedCb?: () => Promise<void> | void;
50
- static wasSeedInvoked: boolean;
51
- static seedOptions: {};
52
- static Store(options: any): DummyStore;
53
- seed(options: StoreSeedOptions): Promise<void>;
54
- }
55
- export {};
@@ -1,43 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { AbstractStore } from '@sprucelabs/data-stores';
11
- import { buildSchema } from '@sprucelabs/schema';
12
- const dummySchema = buildSchema({
13
- id: 'dummy',
14
- fields: {
15
- id: {
16
- type: 'id',
17
- },
18
- },
19
- });
20
- export class DummyStore extends AbstractStore {
21
- constructor() {
22
- super(...arguments);
23
- this.name = 'Dummy!';
24
- this.collectionName = 'dummies';
25
- this.createSchema = dummySchema;
26
- this.updateSchema = dummySchema;
27
- this.fullSchema = dummySchema;
28
- this.databaseSchema = dummySchema;
29
- }
30
- static Store(options) {
31
- return new this(options);
32
- }
33
- seed(options) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- var _a;
36
- DummyStore.wasSeedInvoked = true;
37
- DummyStore.seedOptions = options;
38
- yield ((_a = DummyStore.seedCb) === null || _a === void 0 ? void 0 : _a.call(DummyStore));
39
- });
40
- }
41
- }
42
- DummyStore.wasSeedInvoked = false;
43
- DummyStore.seedOptions = {};
@@ -1,23 +0,0 @@
1
- import AbstractSpruceTest from '@sprucelabs/test-utils';
2
- declare module '@sprucelabs/data-stores/build/types/stores.types' {
3
- interface StoreMap {
4
- good: any;
5
- }
6
- }
7
- export default class StoreFixtureTest extends AbstractSpruceTest {
8
- private static originalDestroy;
9
- private static originalAfterEach;
10
- protected static beforeAll(): Promise<void>;
11
- protected static beforeEach(): Promise<void>;
12
- protected static canGetFixture(): Promise<void>;
13
- protected static canGetFunctioningStores(): Promise<void>;
14
- protected static beforeAllCallsBeforeAllOnDatabaseFixture(): Promise<void>;
15
- protected static beforeEachCallsDestroyOnDatabaseFixture(): Promise<void>;
16
- protected static afterEachCallsAfterEachOnDatabaseFixture(): Promise<void>;
17
- protected static storeLoaderUsesNewInstanceOfDbEachRun(): Promise<void>;
18
- protected static storeFixtureCallsResetOnStoreFactory(): Promise<void>;
19
- protected static callsBeforeEachOnCursorFaker(): Promise<void>;
20
- protected static canGetStore(): Promise<void>;
21
- private static setStoreDirToOneGoodStore;
22
- private static FixtureFactory;
23
- }