@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.
- package/build/esm/index.d.ts +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/tests/fixtures/ViewFixture.d.ts +1 -1
- package/build/esm/tests/routers/TestRouter.d.ts +1 -1
- package/build/esm/tests/routers/TestRouter.js +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -1
- package/build/tests/fixtures/ViewFixture.d.ts +1 -1
- package/build/tests/routers/TestRouter.d.ts +1 -1
- package/build/tests/routers/TestRouter.js +1 -1
- package/package.json +19 -19
- package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
- package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -112
- package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
- package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -34
- package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
- package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -26
- package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
- package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -69
- package/build/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
- package/build/__tests__/behavioral/FakingEventResponses.test.js +0 -126
- package/build/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
- package/build/__tests__/behavioral/FixtureFactory.test.js +0 -79
- package/build/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
- package/build/__tests__/behavioral/LocationFixture.test.js +0 -144
- package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
- package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -95
- package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
- package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -35
- package/build/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
- package/build/__tests__/behavioral/MercuryFixture.test.js +0 -187
- package/build/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
- package/build/__tests__/behavioral/OrganizationFixture.test.js +0 -333
- package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
- package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -21
- package/build/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
- package/build/__tests__/behavioral/PersonFixture.test.js +0 -225
- package/build/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
- package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -95
- package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
- package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -67
- package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
- package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -44
- package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
- package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -55
- package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
- package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -137
- package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
- package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -54
- package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
- package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -40
- package/build/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
- package/build/__tests__/behavioral/RoleFixture.test.js +0 -118
- package/build/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
- package/build/__tests__/behavioral/SkillFixture.test.js +0 -118
- package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
- package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -41
- package/build/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
- package/build/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -59
- package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
- package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -34
- package/build/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
- package/build/__tests__/behavioral/databases/DummyStore.js +0 -36
- package/build/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
- package/build/__tests__/behavioral/databases/StoreFixture.test.js +0 -156
- package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
- package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -73
- package/build/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
- package/build/__tests__/behavioral/faking/FakeDecorator.test.js +0 -421
- package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -23
- package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -27
- package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
- package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -93
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -56
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -141
- package/build/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
- package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -35
- package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
- package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -42
- package/build/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
- package/build/__tests__/behavioral/faking/FakingLocations.test.js +0 -45
- package/build/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
- package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -140
- package/build/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
- package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -174
- package/build/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/UpdatePerson.test.js +0 -32
- package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
- package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -321
- package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -48
- package/build/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
- package/build/__tests__/behavioral/faking/WhoAmI.test.js +0 -105
- package/build/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
- package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -76
- package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
- package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -272
- package/build/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
- package/build/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -35
- package/build/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
- package/build/__tests__/behavioral/seeding/SeedingData.test.js +0 -271
- package/build/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
- package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -266
- package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
- package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -117
- package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
- package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -55
- package/build/__tests__/behavioral/views/Routing.test.d.ts +0 -36
- package/build/__tests__/behavioral/views/Routing.test.js +0 -177
- package/build/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
- package/build/__tests__/behavioral/views/TestingScope.test.js +0 -197
- package/build/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
- package/build/__tests__/behavioral/views/ViewPlugins.test.js +0 -83
- package/build/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
- package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -55
- package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
- package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -761
- package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
- package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -29
- package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
- package/build/__tests__/support/AbstractFakeDecoratorTest.js +0 -27
- package/build/__tests__/support/EventFaker.d.ts +0 -5
- package/build/__tests__/support/EventFaker.js +0 -36
- package/build/__tests__/support/RandomViewPlugin.d.ts +0 -2
- package/build/__tests__/support/RandomViewPlugin.js +0 -5
- package/build/__tests__/support/RandomViewPlugin2.d.ts +0 -2
- package/build/__tests__/support/RandomViewPlugin2.js +0 -5
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.js +0 -9
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -33
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/src/.spruce/settings.json +0 -6
- package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.d.ts +0 -6
- package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.js +0 -11
- package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.d.ts +0 -6
- package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/build/.spruce/views/views.js +0 -18
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -19
- package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -31
- package/build/__tests__/testDirsAndFiles/skill/package.json +0 -5
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/settings.json +0 -6
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.d.ts +0 -7
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.js +0 -17
- package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -31
- package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
- package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -128
- package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -40
- package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -23
- package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -80
- package/build/esm/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +0 -148
- package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/FixtureFactory.test.js +0 -61
- package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
- package/build/esm/__tests__/behavioral/LocationFixture.test.js +0 -173
- package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -113
- package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -41
- package/build/esm/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
- package/build/esm/__tests__/behavioral/MercuryFixture.test.js +0 -223
- package/build/esm/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
- package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +0 -389
- package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -18
- package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
- package/build/esm/__tests__/behavioral/PersonFixture.test.js +0 -232
- package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
- package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -112
- package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -84
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -55
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -72
- package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
- package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -146
- package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -66
- package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -51
- package/build/esm/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
- package/build/esm/__tests__/behavioral/RoleFixture.test.js +0 -143
- package/build/esm/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
- package/build/esm/__tests__/behavioral/SkillFixture.test.js +0 -141
- package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -53
- package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -48
- package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -28
- package/build/esm/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
- package/build/esm/__tests__/behavioral/databases/DummyStore.js +0 -43
- package/build/esm/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
- package/build/esm/__tests__/behavioral/databases/StoreFixture.test.js +0 -164
- package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
- package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -89
- package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
- package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +0 -482
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -28
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -32
- package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -82
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -70
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -165
- package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -43
- package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -55
- package/build/esm/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/faking/FakingLocations.test.js +0 -55
- package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
- package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -175
- package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -214
- package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +0 -38
- package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
- package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -360
- package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -31
- package/build/esm/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
- package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +0 -142
- package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
- package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -94
- package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
- package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -324
- package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -43
- package/build/esm/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/seeding/SeedingData.test.js +0 -314
- package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
- package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -322
- package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
- package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -138
- package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -70
- package/build/esm/__tests__/behavioral/views/Routing.test.d.ts +0 -36
- package/build/esm/__tests__/behavioral/views/Routing.test.js +0 -212
- package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/views/TestingScope.test.js +0 -238
- package/build/esm/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/views/ViewPlugins.test.js +0 -103
- package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
- package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -64
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -856
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -39
- package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
- package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +0 -34
- package/build/esm/__tests__/support/EventFaker.d.ts +0 -5
- package/build/esm/__tests__/support/EventFaker.js +0 -45
- package/build/esm/__tests__/support/RandomViewPlugin.d.ts +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin.js +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin2.d.ts +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin2.js +0 -2
- package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
- package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -41
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -9
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -28
- package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -26
- package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -9
- package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -26
- /package/build/{__tests__/support → esm/tests}/FakeThemeManager.d.ts +0 -0
- /package/build/esm/{__tests__/support → tests}/FakeThemeManager.js +0 -0
- /package/build/{esm/__tests__/support → tests}/FakeThemeManager.d.ts +0 -0
- /package/build/{__tests__/support → tests}/FakeThemeManager.js +0 -0
@@ -1,118 +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 spruce_event_utils_1 = require("@sprucelabs/spruce-event-utils");
|
13
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
14
|
-
const test_utils_2 = require("@sprucelabs/test-utils");
|
15
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../tests/AbstractSpruceFixtureTest"));
|
16
|
-
const constants_1 = require("../../tests/constants");
|
17
|
-
const fake_1 = __importDefault(require("../../tests/decorators/fake"));
|
18
|
-
const seed_1 = __importDefault(require("../../tests/decorators/seed"));
|
19
|
-
let RoleFixtureTest = class RoleFixtureTest extends AbstractSpruceFixtureTest_1.default {
|
20
|
-
static async beforeEach() {
|
21
|
-
await super.beforeEach();
|
22
|
-
this.fixture = this.Fixture('role');
|
23
|
-
this.client = fake_1.default.getClient();
|
24
|
-
}
|
25
|
-
static hasRoleFixture() {
|
26
|
-
test_utils_1.assert.isTruthy(this.fixture);
|
27
|
-
}
|
28
|
-
static async cantListRolesWithoutOrg() {
|
29
|
-
const err = await test_utils_1.assert.doesThrowAsync(() => this.fixture.listRoles());
|
30
|
-
test_utils_2.errorAssert.assertError(err, 'MISSING_PARAMETERS', {
|
31
|
-
parameters: ['organizationId'],
|
32
|
-
});
|
33
|
-
}
|
34
|
-
static async listsValidRoles() {
|
35
|
-
const roles = await this.fixture.listRoles();
|
36
|
-
test_utils_1.assert.isArray(roles);
|
37
|
-
test_utils_1.assert.isAbove(roles.length, 0);
|
38
|
-
for (const role of roles) {
|
39
|
-
const results = await this.client.emit('get-role::v2020_12_25', {
|
40
|
-
target: {
|
41
|
-
roleId: role.id,
|
42
|
-
},
|
43
|
-
});
|
44
|
-
spruce_event_utils_1.eventResponseUtil.getFirstResponseOrThrow(results);
|
45
|
-
}
|
46
|
-
}
|
47
|
-
static async listsWorkingRolesByDefault() {
|
48
|
-
const allRoles = await this.listRoles();
|
49
|
-
const expectedRoles = allRoles.filter((role) => role.base !== 'anonymous' && role.base !== 'loggedIn');
|
50
|
-
await this.assertListedRolesMatchExpected(expectedRoles);
|
51
|
-
}
|
52
|
-
static async listMetaRolesWithOptions() {
|
53
|
-
const allRoles = await this.listRoles();
|
54
|
-
await this.assertListedRolesMatchExpected(allRoles, {
|
55
|
-
shouldIncludeMetaRoles: true,
|
56
|
-
});
|
57
|
-
}
|
58
|
-
static async canPassOwnOrg() {
|
59
|
-
const orgs = await this.organizations.listOrganizations();
|
60
|
-
const org = orgs[2];
|
61
|
-
const roles = await this.fixture.listRoles({ organizationId: org.id });
|
62
|
-
test_utils_1.assert.isEqual(roles[0].organizationId, org.id);
|
63
|
-
}
|
64
|
-
static async getNewestOrg() {
|
65
|
-
const org = await this.organizations.getNewestOrganization();
|
66
|
-
test_utils_1.assert.isTruthy(org, `You gotta @seed('organizations',1) to continue.`);
|
67
|
-
return org;
|
68
|
-
}
|
69
|
-
static async assertListedRolesMatchExpected(expectedRoles, options) {
|
70
|
-
const roles = await this.fixture.listRoles(options);
|
71
|
-
function sort(a, b) {
|
72
|
-
return a.name > b.name ? 1 : -1;
|
73
|
-
}
|
74
|
-
roles.sort(sort);
|
75
|
-
expectedRoles.sort(sort);
|
76
|
-
test_utils_1.assert.isEqualDeep(roles, expectedRoles);
|
77
|
-
}
|
78
|
-
static async listRoles() {
|
79
|
-
const org = await this.getNewestOrg();
|
80
|
-
const roleResults = await this.client.emit('list-roles::v2020_12_25', {
|
81
|
-
target: {
|
82
|
-
organizationId: org.id,
|
83
|
-
},
|
84
|
-
payload: {
|
85
|
-
shouldIncludePrivateRoles: true,
|
86
|
-
shouldIncludeMetaRoles: true,
|
87
|
-
},
|
88
|
-
});
|
89
|
-
const { roles: allRoles } = spruce_event_utils_1.eventResponseUtil.getFirstResponseOrThrow(roleResults);
|
90
|
-
return allRoles;
|
91
|
-
}
|
92
|
-
};
|
93
|
-
__decorate([
|
94
|
-
(0, test_utils_1.test)()
|
95
|
-
], RoleFixtureTest, "hasRoleFixture", null);
|
96
|
-
__decorate([
|
97
|
-
(0, test_utils_1.test)()
|
98
|
-
], RoleFixtureTest, "cantListRolesWithoutOrg", null);
|
99
|
-
__decorate([
|
100
|
-
(0, test_utils_1.test)(),
|
101
|
-
(0, seed_1.default)('organizations', 1)
|
102
|
-
], RoleFixtureTest, "listsValidRoles", null);
|
103
|
-
__decorate([
|
104
|
-
(0, test_utils_1.test)(),
|
105
|
-
(0, seed_1.default)('organizations', 1)
|
106
|
-
], RoleFixtureTest, "listsWorkingRolesByDefault", null);
|
107
|
-
__decorate([
|
108
|
-
(0, test_utils_1.test)(),
|
109
|
-
(0, seed_1.default)('organizations', 1)
|
110
|
-
], RoleFixtureTest, "listMetaRolesWithOptions", null);
|
111
|
-
__decorate([
|
112
|
-
(0, test_utils_1.test)(),
|
113
|
-
(0, seed_1.default)('organizations', 3)
|
114
|
-
], RoleFixtureTest, "canPassOwnOrg", null);
|
115
|
-
RoleFixtureTest = __decorate([
|
116
|
-
fake_1.default.login(constants_1.DEMO_NUMBER_ROLE_FIXTURE)
|
117
|
-
], RoleFixtureTest);
|
118
|
-
exports.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,118 +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 spruce_event_utils_1 = require("@sprucelabs/spruce-event-utils");
|
13
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
14
|
-
const test_utils_2 = require("@sprucelabs/test-utils");
|
15
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../tests/AbstractSpruceFixtureTest"));
|
16
|
-
const constants_1 = require("../../tests/constants");
|
17
|
-
const login_1 = __importDefault(require("../../tests/decorators/login"));
|
18
|
-
const MercuryFixture_1 = __importDefault(require("../../tests/fixtures/MercuryFixture"));
|
19
|
-
MercuryFixture_1.default.setShouldRequireLocalListeners(false);
|
20
|
-
let SkillFixtureTest = class SkillFixtureTest extends AbstractSpruceFixtureTest_1.default {
|
21
|
-
static async beforeEach() {
|
22
|
-
await super.beforeEach();
|
23
|
-
this.fixture = this.Fixture('skill');
|
24
|
-
delete process.env.SKILL_ID;
|
25
|
-
delete process.env.SKILL_API_KEY;
|
26
|
-
}
|
27
|
-
static async canCreateSkillFixture() {
|
28
|
-
test_utils_1.assert.isTruthy(this.fixture);
|
29
|
-
}
|
30
|
-
static async canSeedSkill() {
|
31
|
-
const skill = await this.fixture.seedDemoSkill({
|
32
|
-
name: 'skill1',
|
33
|
-
});
|
34
|
-
test_utils_1.assert.isTruthy(skill);
|
35
|
-
test_utils_1.assert.isEqual(skill.name, 'skill1');
|
36
|
-
}
|
37
|
-
static async cleansUpSkillsAndNotCrashWithMultileDestroys() {
|
38
|
-
const skill = await this.fixture.seedDemoSkill({
|
39
|
-
name: 'skill1',
|
40
|
-
});
|
41
|
-
await this.fixture.destroy();
|
42
|
-
await this.fixture.destroy();
|
43
|
-
const client = await this.Fixture('mercury').connectToApi();
|
44
|
-
const results = await client.emit('get-skill::v2020_12_25', {
|
45
|
-
target: {
|
46
|
-
skillId: skill.id,
|
47
|
-
},
|
48
|
-
});
|
49
|
-
spruce_event_utils_1.eventAssertUtil.assertErrorFromResponse(results, 'INVALID_TARGET');
|
50
|
-
}
|
51
|
-
static async cantLoginAsCurrentSkillIfSkillNotConfigured() {
|
52
|
-
const err = await test_utils_1.assert.doesThrowAsync(() => this.fixture.loginAsCurrentSkill());
|
53
|
-
test_utils_2.errorAssert.assertError(err, 'MISSING_PARAMETERS', {
|
54
|
-
parameters: ['env.SKILL_ID', 'env.SKILL_API_KEY'],
|
55
|
-
});
|
56
|
-
}
|
57
|
-
static async cantLoginAsCurrentSkillIfSkillNotConfiguredWithApiKey() {
|
58
|
-
process.env.SKILL_ID = '123';
|
59
|
-
const err = await test_utils_1.assert.doesThrowAsync(() => this.fixture.loginAsCurrentSkill());
|
60
|
-
test_utils_2.errorAssert.assertError(err, 'MISSING_PARAMETERS', {
|
61
|
-
parameters: ['env.SKILL_API_KEY'],
|
62
|
-
});
|
63
|
-
}
|
64
|
-
static async canLoginAsCurrentSkill() {
|
65
|
-
const { skill: demoSkill } = await this.fixture.loginAsDemoSkill({
|
66
|
-
name: 'Demo me!',
|
67
|
-
});
|
68
|
-
process.env.SKILL_ID = demoSkill.id;
|
69
|
-
process.env.SKILL_API_KEY = demoSkill.apiKey;
|
70
|
-
const { skill, client } = await this.fixture.loginAsCurrentSkill();
|
71
|
-
test_utils_1.assert.isTruthy(skill);
|
72
|
-
test_utils_1.assert.isTruthy(client);
|
73
|
-
test_utils_1.assert.isEqual(skill.id, demoSkill.id);
|
74
|
-
test_utils_1.assert.isEqual(skill.apiKey, demoSkill.apiKey);
|
75
|
-
}
|
76
|
-
static async shouldUnRegisterDemoSkills() {
|
77
|
-
const { client } = await this.fixture.loginAsDemoSkill({
|
78
|
-
name: 'Demo me!',
|
79
|
-
});
|
80
|
-
await this.fixture.destroy();
|
81
|
-
const results = await client.emit('whoami::v2020_12_25');
|
82
|
-
test_utils_1.assert.doesThrow(() => spruce_event_utils_1.eventResponseUtil.getFirstResponseOrThrow(results));
|
83
|
-
}
|
84
|
-
static canPassThroughPersonFixture() {
|
85
|
-
const personFixture = this.Fixture('person');
|
86
|
-
const fixture = this.Fixture('skill', { personFixture });
|
87
|
-
//@ts-ignore
|
88
|
-
test_utils_1.assert.isEqual(fixture.personFixture, personFixture);
|
89
|
-
}
|
90
|
-
};
|
91
|
-
__decorate([
|
92
|
-
(0, test_utils_1.test)()
|
93
|
-
], SkillFixtureTest, "canCreateSkillFixture", null);
|
94
|
-
__decorate([
|
95
|
-
(0, test_utils_1.test)()
|
96
|
-
], SkillFixtureTest, "canSeedSkill", null);
|
97
|
-
__decorate([
|
98
|
-
(0, test_utils_1.test)()
|
99
|
-
], SkillFixtureTest, "cleansUpSkillsAndNotCrashWithMultileDestroys", null);
|
100
|
-
__decorate([
|
101
|
-
(0, test_utils_1.test)()
|
102
|
-
], SkillFixtureTest, "cantLoginAsCurrentSkillIfSkillNotConfigured", null);
|
103
|
-
__decorate([
|
104
|
-
(0, test_utils_1.test)()
|
105
|
-
], SkillFixtureTest, "cantLoginAsCurrentSkillIfSkillNotConfiguredWithApiKey", null);
|
106
|
-
__decorate([
|
107
|
-
(0, test_utils_1.test)()
|
108
|
-
], SkillFixtureTest, "canLoginAsCurrentSkill", null);
|
109
|
-
__decorate([
|
110
|
-
(0, test_utils_1.test)()
|
111
|
-
], SkillFixtureTest, "shouldUnRegisterDemoSkills", null);
|
112
|
-
__decorate([
|
113
|
-
(0, test_utils_1.test)()
|
114
|
-
], SkillFixtureTest, "canPassThroughPersonFixture", null);
|
115
|
-
SkillFixtureTest = __decorate([
|
116
|
-
(0, login_1.default)(constants_1.DEMO_NUMBER_SKILL_FIXTURE)
|
117
|
-
], SkillFixtureTest);
|
118
|
-
exports.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,41 +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 test_utils_1 = require("@sprucelabs/test-utils");
|
13
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
14
|
-
const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
|
15
|
-
const StoreFixture_1 = __importDefault(require("../../../tests/fixtures/StoreFixture"));
|
16
|
-
// eslint-disable-next-line spruce/prohibit-import-from-build-folder
|
17
|
-
const Good_store_1 = __importDefault(require("../../testDirsAndFiles/one-good-store-skill/build/stores/Good.store"));
|
18
|
-
class CanUseStoresSetupInBeforeEachTest extends AbstractSpruceFixtureTest_1.default {
|
19
|
-
static async beforeEach() {
|
20
|
-
await super.beforeEach();
|
21
|
-
this.goodStore = await this.Fixture('store').Store('good');
|
22
|
-
}
|
23
|
-
static async shouldNotLoseData() {
|
24
|
-
const count = await this.goodStore.count({});
|
25
|
-
test_utils_1.assert.isEqual(count, 3);
|
26
|
-
}
|
27
|
-
static async shouldNotLoseData2() {
|
28
|
-
const count = await this.goodStore.count({});
|
29
|
-
test_utils_1.assert.isEqual(count, 10);
|
30
|
-
}
|
31
|
-
}
|
32
|
-
exports.default = CanUseStoresSetupInBeforeEachTest;
|
33
|
-
__decorate([
|
34
|
-
(0, test_utils_1.test)(),
|
35
|
-
(0, seed_1.default)('good', 3)
|
36
|
-
], CanUseStoresSetupInBeforeEachTest, "shouldNotLoseData", null);
|
37
|
-
__decorate([
|
38
|
-
(0, test_utils_1.test)(),
|
39
|
-
(0, seed_1.default)('good', 10)
|
40
|
-
], CanUseStoresSetupInBeforeEachTest, "shouldNotLoseData2", null);
|
41
|
-
StoreFixture_1.default.setStore('good', Good_store_1.default);
|
@@ -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,59 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
19
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
20
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
21
|
-
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;
|
22
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
23
|
-
};
|
24
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
25
|
-
if (mod && mod.__esModule) return mod;
|
26
|
-
var result = {};
|
27
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
28
|
-
__setModuleDefault(result, mod);
|
29
|
-
return result;
|
30
|
-
};
|
31
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
32
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
33
|
-
};
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
35
|
-
const data_stores_1 = require("@sprucelabs/data-stores");
|
36
|
-
const test_utils_1 = __importStar(require("@sprucelabs/test-utils"));
|
37
|
-
const FixtureFactory_1 = __importDefault(require("../../../tests/fixtures/FixtureFactory"));
|
38
|
-
class StoreFixtureTest extends test_utils_1.default {
|
39
|
-
static async beforeEach() {
|
40
|
-
await super.beforeEach();
|
41
|
-
this.fixture = new FixtureFactory_1.default({ cwd: this.cwd }).Fixture('database');
|
42
|
-
}
|
43
|
-
static async canGetDatabaseFixture() {
|
44
|
-
test_utils_1.assert.isTruthy(this.fixture);
|
45
|
-
}
|
46
|
-
static async canConnectToDabatase() {
|
47
|
-
const db = await this.fixture.connectToDatabase();
|
48
|
-
test_utils_1.assert.isTrue(db.isConnected());
|
49
|
-
await data_stores_1.DatabaseFixture.destroy();
|
50
|
-
test_utils_1.assert.isFalse(db.isConnected());
|
51
|
-
}
|
52
|
-
}
|
53
|
-
exports.default = StoreFixtureTest;
|
54
|
-
__decorate([
|
55
|
-
(0, test_utils_1.test)()
|
56
|
-
], StoreFixtureTest, "canGetDatabaseFixture", null);
|
57
|
-
__decorate([
|
58
|
-
(0, test_utils_1.test)()
|
59
|
-
], StoreFixtureTest, "canConnectToDabatase", null);
|
@@ -1,34 +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 test_utils_1 = require("@sprucelabs/test-utils");
|
13
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
14
|
-
const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
|
15
|
-
const StoreFixture_1 = __importDefault(require("../../../tests/fixtures/StoreFixture"));
|
16
|
-
// eslint-disable-next-line spruce/prohibit-import-from-build-folder
|
17
|
-
const Good_store_1 = __importDefault(require("../../testDirsAndFiles/one-good-store-skill/build/stores/Good.store"));
|
18
|
-
//do not seed anything else here, this test is to ensure db settings are reset before any
|
19
|
-
//seed is called
|
20
|
-
class DbResetsAsExpectedTest extends AbstractSpruceFixtureTest_1.default {
|
21
|
-
static shouldBeReset() {
|
22
|
-
test_utils_1.assert.isEqual(process.env.DB_NAME, 'memory');
|
23
|
-
test_utils_1.assert.isEqual(process.env.DB_CONNECTION_STRING, 'memory://');
|
24
|
-
}
|
25
|
-
static doesNothing() { }
|
26
|
-
}
|
27
|
-
exports.default = DbResetsAsExpectedTest;
|
28
|
-
__decorate([
|
29
|
-
(0, test_utils_1.test)()
|
30
|
-
], DbResetsAsExpectedTest, "shouldBeReset", null);
|
31
|
-
__decorate([
|
32
|
-
(0, seed_1.default)('good', 1)
|
33
|
-
], DbResetsAsExpectedTest, "doesNothing", null);
|
34
|
-
StoreFixture_1.default.setStore('good', Good_store_1.default);
|
@@ -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,36 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.DummyStore = void 0;
|
4
|
-
const data_stores_1 = require("@sprucelabs/data-stores");
|
5
|
-
const schema_1 = require("@sprucelabs/schema");
|
6
|
-
const dummySchema = (0, schema_1.buildSchema)({
|
7
|
-
id: 'dummy',
|
8
|
-
fields: {
|
9
|
-
id: {
|
10
|
-
type: 'id',
|
11
|
-
},
|
12
|
-
},
|
13
|
-
});
|
14
|
-
class DummyStore extends data_stores_1.AbstractStore {
|
15
|
-
constructor() {
|
16
|
-
super(...arguments);
|
17
|
-
this.name = 'Dummy!';
|
18
|
-
this.collectionName = 'dummies';
|
19
|
-
this.createSchema = dummySchema;
|
20
|
-
this.updateSchema = dummySchema;
|
21
|
-
this.fullSchema = dummySchema;
|
22
|
-
this.databaseSchema = dummySchema;
|
23
|
-
}
|
24
|
-
static Store(options) {
|
25
|
-
return new this(options);
|
26
|
-
}
|
27
|
-
async seed(options) {
|
28
|
-
var _a;
|
29
|
-
DummyStore.wasSeedInvoked = true;
|
30
|
-
DummyStore.seedOptions = options;
|
31
|
-
await ((_a = DummyStore.seedCb) === null || _a === void 0 ? void 0 : _a.call(DummyStore));
|
32
|
-
}
|
33
|
-
}
|
34
|
-
exports.DummyStore = DummyStore;
|
35
|
-
DummyStore.wasSeedInvoked = false;
|
36
|
-
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
|
-
}
|