@sprucelabs/spruce-test-fixtures 62.2.24 → 62.2.26

Sign up to get free protection for your applications and to get access to all the features.
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,5 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../../../tests/AbstractSpruceFixtureTest';
2
- export default class ViewFixtureLetsYouOverrideViewControllerFactoryTest extends AbstractSpruceFixtureTest {
3
- protected static beforeEach(): Promise<void>;
4
- protected static canCreateViewFixtureLetsYouOverrideViewControllerFactory(): Promise<void>;
5
- }
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
13
- const test_utils_1 = require("@sprucelabs/test-utils");
14
- const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../../tests/AbstractSpruceFixtureTest"));
15
- class ViewFixtureLetsYouOverrideViewControllerFactoryTest extends AbstractSpruceFixtureTest_1.default {
16
- static async beforeEach() {
17
- await super.beforeEach();
18
- }
19
- static async canCreateViewFixtureLetsYouOverrideViewControllerFactory() {
20
- test_utils_1.assert.isEqual(heartwood_view_controllers_1.ViewControllerFactory.Class, MySpyViewControllerFactory);
21
- }
22
- }
23
- exports.default = ViewFixtureLetsYouOverrideViewControllerFactoryTest;
24
- __decorate([
25
- (0, test_utils_1.test)()
26
- ], ViewFixtureLetsYouOverrideViewControllerFactoryTest, "canCreateViewFixtureLetsYouOverrideViewControllerFactory", null);
27
- class MySpyViewControllerFactory extends heartwood_view_controllers_1.ViewControllerFactory {
28
- }
29
- heartwood_view_controllers_1.ViewControllerFactory.Class = MySpyViewControllerFactory;
@@ -1,5 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
2
- export default class AbstractFakeDecoratorTest extends AbstractSpruceFixtureTest {
3
- protected static fakeLoginAndGetAuth(phone?: string): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.AuthSchemaSchema, false>>, "person" | "skill">>;
4
- protected static fakeLogin(number?: string): Promise<void>;
5
- }
@@ -1,27 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const test_utils_1 = require("@sprucelabs/test-utils");
7
- const AbstractSpruceFixtureTest_1 = __importDefault(require("../../tests/AbstractSpruceFixtureTest"));
8
- const constants_1 = require("../../tests/constants");
9
- const fake_1 = __importDefault(require("../../tests/decorators/fake"));
10
- class AbstractFakeDecoratorTest extends AbstractSpruceFixtureTest_1.default {
11
- static async fakeLoginAndGetAuth(phone = constants_1.DEMO_NUMBER) {
12
- await this.fakeLogin(phone);
13
- const { client, person } = await this.people.loginAsDemoPerson();
14
- const [{ auth, type }] = await client.emitAndFlattenResponses('whoami::v2020_12_25');
15
- test_utils_1.assert.isEqual(type, 'authenticated');
16
- test_utils_1.assert.isEqualDeep(auth.person, this.fakedPerson);
17
- test_utils_1.assert.isEqualDeep(person, this.fakedPerson);
18
- return auth;
19
- }
20
- static async fakeLogin(number = constants_1.DEMO_NUMBER) {
21
- const decorator = fake_1.default.login(number);
22
- decorator(this, false);
23
- await this.beforeAll();
24
- await this.beforeEach();
25
- }
26
- }
27
- exports.default = AbstractFakeDecoratorTest;
@@ -1,5 +0,0 @@
1
- export default class EventFaker {
2
- fakeRegisterSkill(): Promise<void>;
3
- fakeUnregisterSkill(): Promise<void>;
4
- fakeRegisterProxyToken(): Promise<void>;
5
- }
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const test_utils_1 = require("@sprucelabs/test-utils");
7
- const eventFaker_1 = __importDefault(require("../../tests/eventFaker"));
8
- class EventFaker {
9
- async fakeRegisterSkill() {
10
- await eventFaker_1.default.on('register-skill::v2020_12_25', () => {
11
- return {
12
- skill: {
13
- id: (0, test_utils_1.generateId)(),
14
- creators: [{ personId: (0, test_utils_1.generateId)() }],
15
- slug: (0, test_utils_1.generateId)(),
16
- dateCreated: new Date().getTime(),
17
- name: (0, test_utils_1.generateId)(),
18
- apiKey: (0, test_utils_1.generateId)(),
19
- },
20
- };
21
- });
22
- }
23
- async fakeUnregisterSkill() {
24
- await eventFaker_1.default.on('unregister-skill::v2020_12_25', () => {
25
- return {};
26
- });
27
- }
28
- async fakeRegisterProxyToken() {
29
- await eventFaker_1.default.on('register-proxy-token::v2020_12_25', () => {
30
- return {
31
- token: (0, test_utils_1.generateId)(),
32
- };
33
- });
34
- }
35
- }
36
- exports.default = EventFaker;
@@ -1,2 +0,0 @@
1
- export default class RandomViewPlugin {
2
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- class RandomViewPlugin {
4
- }
5
- exports.default = RandomViewPlugin;
@@ -1,2 +0,0 @@
1
- export default class RandomViewPlugin2 {
2
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- class RandomViewPlugin2 {
4
- }
5
- exports.default = RandomViewPlugin2;
@@ -1,5 +0,0 @@
1
- import GoodStore from '../../stores/Good.store';
2
- declare const _default: {
3
- Good: typeof GoodStore;
4
- };
5
- export default _default;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const Good_store_1 = __importDefault(require("../../stores/Good.store"));
7
- exports.default = {
8
- Good: Good_store_1.default,
9
- };
@@ -1,51 +0,0 @@
1
- import { AbstractStore, UniversalStoreOptions } from '@sprucelabs/data-stores';
2
- import { StoreSeedOptions } from '../../../../..';
3
- declare const fullSchema: {
4
- id: string;
5
- fields: {
6
- firstName: {
7
- type: "text";
8
- };
9
- };
10
- };
11
- type FullSchema = typeof fullSchema;
12
- export default class GoodStore extends AbstractStore<FullSchema> {
13
- name: string;
14
- protected collectionName: string;
15
- protected createSchema: {
16
- id: string;
17
- fields: {
18
- firstName: {
19
- type: "text";
20
- };
21
- };
22
- };
23
- protected updateSchema: {
24
- id: string;
25
- fields: {
26
- firstName: {
27
- type: "text";
28
- };
29
- };
30
- };
31
- protected fullSchema: {
32
- id: string;
33
- fields: {
34
- firstName: {
35
- type: "text";
36
- };
37
- };
38
- };
39
- protected databaseSchema: {
40
- id: string;
41
- fields: {
42
- firstName: {
43
- type: "text";
44
- };
45
- };
46
- };
47
- static seedParams: any[];
48
- static Store(options: UniversalStoreOptions): GoodStore;
49
- seed(options: StoreSeedOptions, ...rest: any[]): Promise<void>;
50
- }
51
- export {};
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const data_stores_1 = require("@sprucelabs/data-stores");
4
- const schema_1 = require("@sprucelabs/schema");
5
- const fullSchema = (0, schema_1.buildSchema)({
6
- id: 'goodFull',
7
- fields: {
8
- firstName: {
9
- type: 'text',
10
- },
11
- },
12
- });
13
- class GoodStore extends data_stores_1.AbstractStore {
14
- constructor() {
15
- super(...arguments);
16
- this.name = 'good';
17
- this.collectionName = 'good_stuff';
18
- this.createSchema = fullSchema;
19
- this.updateSchema = fullSchema;
20
- this.fullSchema = fullSchema;
21
- this.databaseSchema = fullSchema;
22
- }
23
- static Store(options) {
24
- return new this(options.db);
25
- }
26
- async seed(options, ...rest) {
27
- GoodStore.seedParams = rest;
28
- await Promise.all(new Array(options.totalToSeed).fill(0).map(() => this.createOne({
29
- firstName: 'hola!',
30
- })));
31
- }
32
- }
33
- exports.default = GoodStore;
@@ -1,6 +0,0 @@
1
- {
2
- "installed": [
3
- "skill",
4
- "store"
5
- ]
6
- }
@@ -1,6 +0,0 @@
1
- import RandomViewPlugin from '../../../../../support/RandomViewPlugin';
2
- export declare const pluginsByName: {
3
- test1: typeof RandomViewPlugin;
4
- };
5
- declare const _default: {};
6
- export default _default;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.pluginsByName = void 0;
7
- const RandomViewPlugin_1 = __importDefault(require("../../../../../support/RandomViewPlugin"));
8
- exports.pluginsByName = {
9
- test1: RandomViewPlugin_1.default,
10
- };
11
- exports.default = {};
@@ -1,6 +0,0 @@
1
- import RandomViewPlugin2 from '../../../../../support/RandomViewPlugin2';
2
- export declare const pluginsByName: {
3
- test2: typeof RandomViewPlugin2;
4
- };
5
- declare const _default: {};
6
- export default _default;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.pluginsByName = void 0;
7
- const RandomViewPlugin2_1 = __importDefault(require("../../../../../support/RandomViewPlugin2"));
8
- exports.pluginsByName = {
9
- test2: RandomViewPlugin2_1.default,
10
- };
11
- exports.default = {};
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const Book_svc_1 = __importDefault(require("../../skillViewControllers/Book.svc"));
7
- const Spy_svc_1 = __importDefault(require("../../skillViewControllers/Spy.svc"));
8
- const BookForm_vc_1 = __importDefault(require("../../viewControllers/BookForm.vc"));
9
-
10
- const vcs = {
11
- BookSkillViewController: Book_svc_1.default,
12
- BookFormViewController: BookForm_vc_1.default,
13
- SpyViewController: Spy_svc_1.default,
14
- };
15
- //@ts-ignore
16
- if(typeof heartwood === 'function') { heartwood(vcs); }
17
- exports.default = vcs;
18
- //# sourceMappingURL=views.js.map
@@ -1,5 +0,0 @@
1
- import { AbstractSkillViewController } from '@sprucelabs/heartwood-view-controllers';
2
- export default class BookSkillViewController extends AbstractSkillViewController {
3
- static id: string;
4
- render(): any;
5
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
4
- class BookSkillViewController extends heartwood_view_controllers_1.AbstractSkillViewController {
5
- //@ts-ignore
6
- render() {
7
- return 'go-team';
8
- }
9
- }
10
- BookSkillViewController.id = 'book';
11
- exports.default = BookSkillViewController;
@@ -1,7 +0,0 @@
1
- import { AbstractSkillViewController, SkillViewControllerLoadOptions, SpruceSchemas } from '@sprucelabs/heartwood-view-controllers';
2
- export default class SpySkillViewController extends AbstractSkillViewController {
3
- static id: string;
4
- loads: SkillViewControllerLoadOptions[];
5
- load(options: SkillViewControllerLoadOptions): Promise<void>;
6
- render(): SpruceSchemas.HeartwoodViewControllers.v2021_02_11.SkillView;
7
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
4
- class SpySkillViewController extends heartwood_view_controllers_1.AbstractSkillViewController {
5
- constructor() {
6
- super(...arguments);
7
- this.loads = [];
8
- }
9
- async load(options) {
10
- this.loads.push(options);
11
- }
12
- render() {
13
- return {
14
- layouts: [],
15
- };
16
- }
17
- }
18
- SpySkillViewController.id = 'spy';
19
- exports.default = SpySkillViewController;
@@ -1,8 +0,0 @@
1
- import { AbstractViewController } from '@sprucelabs/heartwood-view-controllers';
2
- export default class BookFormViewController extends AbstractViewController<any> {
3
- static id: string;
4
- render(): {
5
- msg: string;
6
- globalHack2Value: any;
7
- };
8
- }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
7
- const dotenv_1 = __importDefault(require("dotenv"));
8
- class BookFormViewController extends heartwood_view_controllers_1.AbstractViewController {
9
- //@ts-ignore
10
- render() {
11
- //@ts-ignore
12
- console.log = dotenv_1.default;
13
- //@ts-ignore
14
- global.document = {
15
- //@ts-ignore
16
- __hack: true,
17
- };
18
- //@ts-ignore
19
- global.window = {
20
- //@ts-ignore
21
- __hack: true,
22
- };
23
- return {
24
- msg: 'what the?',
25
- //@ts-ignore
26
- globalHack2Value: global.__hack2,
27
- };
28
- }
29
- }
30
- BookFormViewController.id = 'book-form';
31
- exports.default = BookFormViewController;
@@ -1,5 +0,0 @@
1
- {
2
- "skill": {
3
- "namespace": "views"
4
- }
5
- }
@@ -1,6 +0,0 @@
1
- {
2
- "installed": [
3
- "skill",
4
- "view"
5
- ]
6
- }
@@ -1,7 +0,0 @@
1
- import BookSkillViewController from '../../skillViewControllers/Book.svc';
2
- import BookFormViewController from '../../viewControllers/BookForm.vc';
3
- declare const vcs: {
4
- BookSkillViewController: typeof BookSkillViewController;
5
- BookFormViewController: typeof BookFormViewController;
6
- };
7
- export default vcs;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const Book_svc_1 = __importDefault(require("../../skillViewControllers/Book.svc"));
7
- const BookForm_vc_1 = __importDefault(require("../../viewControllers/BookForm.vc"));
8
- const vcs = {
9
- BookSkillViewController: Book_svc_1.default,
10
- BookFormViewController: BookForm_vc_1.default,
11
- };
12
- //@ts-ignore
13
- if (typeof heartwood === 'function') {
14
- //@ts-ignore
15
- heartwood(vcs);
16
- }
17
- exports.default = vcs;
@@ -1,5 +0,0 @@
1
- import { AbstractSkillViewController } from '@sprucelabs/heartwood-view-controllers';
2
- export default class BookSkillViewController extends AbstractSkillViewController {
3
- static id: string;
4
- render(): string;
5
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
4
- class BookSkillViewController extends heartwood_view_controllers_1.AbstractSkillViewController {
5
- //@ts-ignore
6
- render() {
7
- return 'go-team';
8
- }
9
- }
10
- BookSkillViewController.id = 'book';
11
- exports.default = BookSkillViewController;
@@ -1,8 +0,0 @@
1
- import { AbstractViewController } from '@sprucelabs/heartwood-view-controllers';
2
- export default class BookFormViewController extends AbstractViewController<any> {
3
- static id: string;
4
- render(): {
5
- msg: string;
6
- globalHack2Value: any;
7
- };
8
- }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
7
- const dotenv_1 = __importDefault(require("dotenv"));
8
- class BookFormViewController extends heartwood_view_controllers_1.AbstractViewController {
9
- //@ts-ignore
10
- render() {
11
- //@ts-ignore
12
- console.log = dotenv_1.default;
13
- //@ts-ignore
14
- global.document = {
15
- //@ts-ignore
16
- __hack: true,
17
- };
18
- //@ts-ignore
19
- global.window = {
20
- //@ts-ignore
21
- __hack: true,
22
- };
23
- return {
24
- msg: 'what the?',
25
- //@ts-ignore
26
- globalHack2Value: global.__hack2,
27
- };
28
- }
29
- }
30
- BookFormViewController.id = 'book-form';
31
- exports.default = BookFormViewController;
@@ -1,15 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
2
- export default class DecoratingEmitToPassThroughProxyTest extends AbstractSpruceFixtureTest {
3
- private static lastInstance;
4
- protected static sharesInstance(): void;
5
- protected static canClearInstance(): void;
6
- protected static canGetAndSetProxyGenerator(): void;
7
- protected static canSetDefaultProxyPassThrough(id: string): Promise<void>;
8
- protected static canSetTokenWhileDecorating(): Promise<void>;
9
- protected static decoratorPassProps(): Promise<void>;
10
- private static assertPropsCopied;
11
- protected static instanceIsSameEachTest(): Promise<void>;
12
- protected static loginSetsUpProxyTokenGenerator(): Promise<void>;
13
- private static assertProxyEquals;
14
- private static getDecorator;
15
- }
@@ -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;