@sprucelabs/spruce-test-fixtures 62.2.23 → 62.2.25
Sign up to get free protection for your applications and to get access to all the features.
- 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/FakeThemeManager.d.ts +0 -8
- package/build/__tests__/support/FakeThemeManager.js +0 -40
- 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/FakeThemeManager.d.ts +0 -8
- package/build/esm/__tests__/support/FakeThemeManager.js +0 -37
- 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
@@ -1,143 +0,0 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
14
|
-
});
|
15
|
-
};
|
16
|
-
import { eventResponseUtil } from '@sprucelabs/spruce-event-utils';
|
17
|
-
import { assert, test } from '@sprucelabs/test-utils';
|
18
|
-
import { errorAssert } from '@sprucelabs/test-utils';
|
19
|
-
import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
|
20
|
-
import { DEMO_NUMBER_ROLE_FIXTURE } from '../../tests/constants.js';
|
21
|
-
import fake from '../../tests/decorators/fake.js';
|
22
|
-
import seed from '../../tests/decorators/seed.js';
|
23
|
-
let RoleFixtureTest = class RoleFixtureTest extends AbstractSpruceFixtureTest {
|
24
|
-
static beforeEach() {
|
25
|
-
const _super = Object.create(null, {
|
26
|
-
beforeEach: { get: () => super.beforeEach }
|
27
|
-
});
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29
|
-
yield _super.beforeEach.call(this);
|
30
|
-
this.fixture = this.Fixture('role');
|
31
|
-
this.client = fake.getClient();
|
32
|
-
});
|
33
|
-
}
|
34
|
-
static hasRoleFixture() {
|
35
|
-
assert.isTruthy(this.fixture);
|
36
|
-
}
|
37
|
-
static cantListRolesWithoutOrg() {
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
39
|
-
const err = yield assert.doesThrowAsync(() => this.fixture.listRoles());
|
40
|
-
errorAssert.assertError(err, 'MISSING_PARAMETERS', {
|
41
|
-
parameters: ['organizationId'],
|
42
|
-
});
|
43
|
-
});
|
44
|
-
}
|
45
|
-
static listsValidRoles() {
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
47
|
-
const roles = yield this.fixture.listRoles();
|
48
|
-
assert.isArray(roles);
|
49
|
-
assert.isAbove(roles.length, 0);
|
50
|
-
for (const role of roles) {
|
51
|
-
const results = yield this.client.emit('get-role::v2020_12_25', {
|
52
|
-
target: {
|
53
|
-
roleId: role.id,
|
54
|
-
},
|
55
|
-
});
|
56
|
-
eventResponseUtil.getFirstResponseOrThrow(results);
|
57
|
-
}
|
58
|
-
});
|
59
|
-
}
|
60
|
-
static listsWorkingRolesByDefault() {
|
61
|
-
return __awaiter(this, void 0, void 0, function* () {
|
62
|
-
const allRoles = yield this.listRoles();
|
63
|
-
const expectedRoles = allRoles.filter((role) => role.base !== 'anonymous' && role.base !== 'loggedIn');
|
64
|
-
yield this.assertListedRolesMatchExpected(expectedRoles);
|
65
|
-
});
|
66
|
-
}
|
67
|
-
static listMetaRolesWithOptions() {
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
69
|
-
const allRoles = yield this.listRoles();
|
70
|
-
yield this.assertListedRolesMatchExpected(allRoles, {
|
71
|
-
shouldIncludeMetaRoles: true,
|
72
|
-
});
|
73
|
-
});
|
74
|
-
}
|
75
|
-
static canPassOwnOrg() {
|
76
|
-
return __awaiter(this, void 0, void 0, function* () {
|
77
|
-
const orgs = yield this.organizations.listOrganizations();
|
78
|
-
const org = orgs[2];
|
79
|
-
const roles = yield this.fixture.listRoles({ organizationId: org.id });
|
80
|
-
assert.isEqual(roles[0].organizationId, org.id);
|
81
|
-
});
|
82
|
-
}
|
83
|
-
static getNewestOrg() {
|
84
|
-
return __awaiter(this, void 0, void 0, function* () {
|
85
|
-
const org = yield this.organizations.getNewestOrganization();
|
86
|
-
assert.isTruthy(org, `You gotta @seed('organizations',1) to continue.`);
|
87
|
-
return org;
|
88
|
-
});
|
89
|
-
}
|
90
|
-
static assertListedRolesMatchExpected(expectedRoles, options) {
|
91
|
-
return __awaiter(this, void 0, void 0, function* () {
|
92
|
-
const roles = yield this.fixture.listRoles(options);
|
93
|
-
function sort(a, b) {
|
94
|
-
return a.name > b.name ? 1 : -1;
|
95
|
-
}
|
96
|
-
roles.sort(sort);
|
97
|
-
expectedRoles.sort(sort);
|
98
|
-
assert.isEqualDeep(roles, expectedRoles);
|
99
|
-
});
|
100
|
-
}
|
101
|
-
static listRoles() {
|
102
|
-
return __awaiter(this, void 0, void 0, function* () {
|
103
|
-
const org = yield this.getNewestOrg();
|
104
|
-
const roleResults = yield this.client.emit('list-roles::v2020_12_25', {
|
105
|
-
target: {
|
106
|
-
organizationId: org.id,
|
107
|
-
},
|
108
|
-
payload: {
|
109
|
-
shouldIncludePrivateRoles: true,
|
110
|
-
shouldIncludeMetaRoles: true,
|
111
|
-
},
|
112
|
-
});
|
113
|
-
const { roles: allRoles } = eventResponseUtil.getFirstResponseOrThrow(roleResults);
|
114
|
-
return allRoles;
|
115
|
-
});
|
116
|
-
}
|
117
|
-
};
|
118
|
-
__decorate([
|
119
|
-
test()
|
120
|
-
], RoleFixtureTest, "hasRoleFixture", null);
|
121
|
-
__decorate([
|
122
|
-
test()
|
123
|
-
], RoleFixtureTest, "cantListRolesWithoutOrg", null);
|
124
|
-
__decorate([
|
125
|
-
test(),
|
126
|
-
seed('organizations', 1)
|
127
|
-
], RoleFixtureTest, "listsValidRoles", null);
|
128
|
-
__decorate([
|
129
|
-
test(),
|
130
|
-
seed('organizations', 1)
|
131
|
-
], RoleFixtureTest, "listsWorkingRolesByDefault", null);
|
132
|
-
__decorate([
|
133
|
-
test(),
|
134
|
-
seed('organizations', 1)
|
135
|
-
], RoleFixtureTest, "listMetaRolesWithOptions", null);
|
136
|
-
__decorate([
|
137
|
-
test(),
|
138
|
-
seed('organizations', 3)
|
139
|
-
], RoleFixtureTest, "canPassOwnOrg", null);
|
140
|
-
RoleFixtureTest = __decorate([
|
141
|
-
fake.login(DEMO_NUMBER_ROLE_FIXTURE)
|
142
|
-
], RoleFixtureTest);
|
143
|
-
export default RoleFixtureTest;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
|
2
|
-
export default class SkillFixtureTest extends AbstractSpruceFixtureTest {
|
3
|
-
private static fixture;
|
4
|
-
protected static beforeEach(): Promise<void>;
|
5
|
-
protected static canCreateSkillFixture(): Promise<void>;
|
6
|
-
protected static canSeedSkill(): Promise<void>;
|
7
|
-
protected static cleansUpSkillsAndNotCrashWithMultileDestroys(): Promise<void>;
|
8
|
-
protected static cantLoginAsCurrentSkillIfSkillNotConfigured(): Promise<void>;
|
9
|
-
protected static cantLoginAsCurrentSkillIfSkillNotConfiguredWithApiKey(): Promise<void>;
|
10
|
-
protected static canLoginAsCurrentSkill(): Promise<void>;
|
11
|
-
protected static shouldUnRegisterDemoSkills(): Promise<void>;
|
12
|
-
protected static canPassThroughPersonFixture(): void;
|
13
|
-
}
|
@@ -1,141 +0,0 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
14
|
-
});
|
15
|
-
};
|
16
|
-
import { eventAssertUtil, eventResponseUtil, } from '@sprucelabs/spruce-event-utils';
|
17
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
18
|
-
import { errorAssert } from '@sprucelabs/test-utils';
|
19
|
-
import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
|
20
|
-
import { DEMO_NUMBER_SKILL_FIXTURE } from '../../tests/constants.js';
|
21
|
-
import login from '../../tests/decorators/login.js';
|
22
|
-
import MercuryFixture from '../../tests/fixtures/MercuryFixture.js';
|
23
|
-
MercuryFixture.setShouldRequireLocalListeners(false);
|
24
|
-
let SkillFixtureTest = class SkillFixtureTest extends AbstractSpruceFixtureTest {
|
25
|
-
static beforeEach() {
|
26
|
-
const _super = Object.create(null, {
|
27
|
-
beforeEach: { get: () => super.beforeEach }
|
28
|
-
});
|
29
|
-
return __awaiter(this, void 0, void 0, function* () {
|
30
|
-
yield _super.beforeEach.call(this);
|
31
|
-
this.fixture = this.Fixture('skill');
|
32
|
-
delete process.env.SKILL_ID;
|
33
|
-
delete process.env.SKILL_API_KEY;
|
34
|
-
});
|
35
|
-
}
|
36
|
-
static canCreateSkillFixture() {
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
38
|
-
assert.isTruthy(this.fixture);
|
39
|
-
});
|
40
|
-
}
|
41
|
-
static canSeedSkill() {
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
43
|
-
const skill = yield this.fixture.seedDemoSkill({
|
44
|
-
name: 'skill1',
|
45
|
-
});
|
46
|
-
assert.isTruthy(skill);
|
47
|
-
assert.isEqual(skill.name, 'skill1');
|
48
|
-
});
|
49
|
-
}
|
50
|
-
static cleansUpSkillsAndNotCrashWithMultileDestroys() {
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
52
|
-
const skill = yield this.fixture.seedDemoSkill({
|
53
|
-
name: 'skill1',
|
54
|
-
});
|
55
|
-
yield this.fixture.destroy();
|
56
|
-
yield this.fixture.destroy();
|
57
|
-
const client = yield this.Fixture('mercury').connectToApi();
|
58
|
-
const results = yield client.emit('get-skill::v2020_12_25', {
|
59
|
-
target: {
|
60
|
-
skillId: skill.id,
|
61
|
-
},
|
62
|
-
});
|
63
|
-
eventAssertUtil.assertErrorFromResponse(results, 'INVALID_TARGET');
|
64
|
-
});
|
65
|
-
}
|
66
|
-
static cantLoginAsCurrentSkillIfSkillNotConfigured() {
|
67
|
-
return __awaiter(this, void 0, void 0, function* () {
|
68
|
-
const err = yield assert.doesThrowAsync(() => this.fixture.loginAsCurrentSkill());
|
69
|
-
errorAssert.assertError(err, 'MISSING_PARAMETERS', {
|
70
|
-
parameters: ['env.SKILL_ID', 'env.SKILL_API_KEY'],
|
71
|
-
});
|
72
|
-
});
|
73
|
-
}
|
74
|
-
static cantLoginAsCurrentSkillIfSkillNotConfiguredWithApiKey() {
|
75
|
-
return __awaiter(this, void 0, void 0, function* () {
|
76
|
-
process.env.SKILL_ID = '123';
|
77
|
-
const err = yield assert.doesThrowAsync(() => this.fixture.loginAsCurrentSkill());
|
78
|
-
errorAssert.assertError(err, 'MISSING_PARAMETERS', {
|
79
|
-
parameters: ['env.SKILL_API_KEY'],
|
80
|
-
});
|
81
|
-
});
|
82
|
-
}
|
83
|
-
static canLoginAsCurrentSkill() {
|
84
|
-
return __awaiter(this, void 0, void 0, function* () {
|
85
|
-
const { skill: demoSkill } = yield this.fixture.loginAsDemoSkill({
|
86
|
-
name: 'Demo me!',
|
87
|
-
});
|
88
|
-
process.env.SKILL_ID = demoSkill.id;
|
89
|
-
process.env.SKILL_API_KEY = demoSkill.apiKey;
|
90
|
-
const { skill, client } = yield this.fixture.loginAsCurrentSkill();
|
91
|
-
assert.isTruthy(skill);
|
92
|
-
assert.isTruthy(client);
|
93
|
-
assert.isEqual(skill.id, demoSkill.id);
|
94
|
-
assert.isEqual(skill.apiKey, demoSkill.apiKey);
|
95
|
-
});
|
96
|
-
}
|
97
|
-
static shouldUnRegisterDemoSkills() {
|
98
|
-
return __awaiter(this, void 0, void 0, function* () {
|
99
|
-
const { client } = yield this.fixture.loginAsDemoSkill({
|
100
|
-
name: 'Demo me!',
|
101
|
-
});
|
102
|
-
yield this.fixture.destroy();
|
103
|
-
const results = yield client.emit('whoami::v2020_12_25');
|
104
|
-
assert.doesThrow(() => eventResponseUtil.getFirstResponseOrThrow(results));
|
105
|
-
});
|
106
|
-
}
|
107
|
-
static canPassThroughPersonFixture() {
|
108
|
-
const personFixture = this.Fixture('person');
|
109
|
-
const fixture = this.Fixture('skill', { personFixture });
|
110
|
-
//@ts-ignore
|
111
|
-
assert.isEqual(fixture.personFixture, personFixture);
|
112
|
-
}
|
113
|
-
};
|
114
|
-
__decorate([
|
115
|
-
test()
|
116
|
-
], SkillFixtureTest, "canCreateSkillFixture", null);
|
117
|
-
__decorate([
|
118
|
-
test()
|
119
|
-
], SkillFixtureTest, "canSeedSkill", null);
|
120
|
-
__decorate([
|
121
|
-
test()
|
122
|
-
], SkillFixtureTest, "cleansUpSkillsAndNotCrashWithMultileDestroys", null);
|
123
|
-
__decorate([
|
124
|
-
test()
|
125
|
-
], SkillFixtureTest, "cantLoginAsCurrentSkillIfSkillNotConfigured", null);
|
126
|
-
__decorate([
|
127
|
-
test()
|
128
|
-
], SkillFixtureTest, "cantLoginAsCurrentSkillIfSkillNotConfiguredWithApiKey", null);
|
129
|
-
__decorate([
|
130
|
-
test()
|
131
|
-
], SkillFixtureTest, "canLoginAsCurrentSkill", null);
|
132
|
-
__decorate([
|
133
|
-
test()
|
134
|
-
], SkillFixtureTest, "shouldUnRegisterDemoSkills", null);
|
135
|
-
__decorate([
|
136
|
-
test()
|
137
|
-
], SkillFixtureTest, "canPassThroughPersonFixture", null);
|
138
|
-
SkillFixtureTest = __decorate([
|
139
|
-
login(DEMO_NUMBER_SKILL_FIXTURE)
|
140
|
-
], SkillFixtureTest);
|
141
|
-
export default SkillFixtureTest;
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
2
|
-
export default class CanUseStoresSetupInBeforeEachTest extends AbstractSpruceFixtureTest {
|
3
|
-
private static goodStore;
|
4
|
-
protected static beforeEach(): Promise<void>;
|
5
|
-
protected static shouldNotLoseData(): Promise<void>;
|
6
|
-
protected static shouldNotLoseData2(): Promise<void>;
|
7
|
-
}
|
@@ -1,53 +0,0 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
14
|
-
});
|
15
|
-
};
|
16
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
17
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
18
|
-
import seed from '../../../tests/decorators/seed.js';
|
19
|
-
import StoreFixture from '../../../tests/fixtures/StoreFixture.js';
|
20
|
-
// eslint-disable-next-line spruce/prohibit-import-from-build-folder
|
21
|
-
import GoodStore from '../../testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js';
|
22
|
-
export default class CanUseStoresSetupInBeforeEachTest extends AbstractSpruceFixtureTest {
|
23
|
-
static beforeEach() {
|
24
|
-
const _super = Object.create(null, {
|
25
|
-
beforeEach: { get: () => super.beforeEach }
|
26
|
-
});
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
28
|
-
yield _super.beforeEach.call(this);
|
29
|
-
this.goodStore = yield this.Fixture('store').Store('good');
|
30
|
-
});
|
31
|
-
}
|
32
|
-
static shouldNotLoseData() {
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
34
|
-
const count = yield this.goodStore.count({});
|
35
|
-
assert.isEqual(count, 3);
|
36
|
-
});
|
37
|
-
}
|
38
|
-
static shouldNotLoseData2() {
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
40
|
-
const count = yield this.goodStore.count({});
|
41
|
-
assert.isEqual(count, 10);
|
42
|
-
});
|
43
|
-
}
|
44
|
-
}
|
45
|
-
__decorate([
|
46
|
-
test(),
|
47
|
-
seed('good', 3)
|
48
|
-
], CanUseStoresSetupInBeforeEachTest, "shouldNotLoseData", null);
|
49
|
-
__decorate([
|
50
|
-
test(),
|
51
|
-
seed('good', 10)
|
52
|
-
], CanUseStoresSetupInBeforeEachTest, "shouldNotLoseData2", null);
|
53
|
-
StoreFixture.setStore('good', GoodStore);
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import AbstractSpruceTest from '@sprucelabs/test-utils';
|
2
|
-
export default class StoreFixtureTest extends AbstractSpruceTest {
|
3
|
-
private static fixture;
|
4
|
-
protected static beforeEach(): Promise<void>;
|
5
|
-
protected static canGetDatabaseFixture(): Promise<void>;
|
6
|
-
protected static canConnectToDabatase(): Promise<void>;
|
7
|
-
}
|
@@ -1,48 +0,0 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
14
|
-
});
|
15
|
-
};
|
16
|
-
import { DatabaseFixture } from '@sprucelabs/data-stores';
|
17
|
-
import AbstractSpruceTest, { assert, test } from '@sprucelabs/test-utils';
|
18
|
-
import FixtureFactory from '../../../tests/fixtures/FixtureFactory.js';
|
19
|
-
export default class StoreFixtureTest extends AbstractSpruceTest {
|
20
|
-
static beforeEach() {
|
21
|
-
const _super = Object.create(null, {
|
22
|
-
beforeEach: { get: () => super.beforeEach }
|
23
|
-
});
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
25
|
-
yield _super.beforeEach.call(this);
|
26
|
-
this.fixture = new FixtureFactory({ cwd: this.cwd }).Fixture('database');
|
27
|
-
});
|
28
|
-
}
|
29
|
-
static canGetDatabaseFixture() {
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
31
|
-
assert.isTruthy(this.fixture);
|
32
|
-
});
|
33
|
-
}
|
34
|
-
static canConnectToDabatase() {
|
35
|
-
return __awaiter(this, void 0, void 0, function* () {
|
36
|
-
const db = yield this.fixture.connectToDatabase();
|
37
|
-
assert.isTrue(db.isConnected());
|
38
|
-
yield DatabaseFixture.destroy();
|
39
|
-
assert.isFalse(db.isConnected());
|
40
|
-
});
|
41
|
-
}
|
42
|
-
}
|
43
|
-
__decorate([
|
44
|
-
test()
|
45
|
-
], StoreFixtureTest, "canGetDatabaseFixture", null);
|
46
|
-
__decorate([
|
47
|
-
test()
|
48
|
-
], StoreFixtureTest, "canConnectToDabatase", null);
|
@@ -1,28 +0,0 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
8
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
9
|
-
import seed from '../../../tests/decorators/seed.js';
|
10
|
-
import StoreFixture from '../../../tests/fixtures/StoreFixture.js';
|
11
|
-
// eslint-disable-next-line spruce/prohibit-import-from-build-folder
|
12
|
-
import GoodStore from '../../testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js';
|
13
|
-
//do not seed anything else here, this test is to ensure db settings are reset before any
|
14
|
-
//seed is called
|
15
|
-
export default class DbResetsAsExpectedTest extends AbstractSpruceFixtureTest {
|
16
|
-
static shouldBeReset() {
|
17
|
-
assert.isEqual(process.env.DB_NAME, 'memory');
|
18
|
-
assert.isEqual(process.env.DB_CONNECTION_STRING, 'memory://');
|
19
|
-
}
|
20
|
-
static doesNothing() { }
|
21
|
-
}
|
22
|
-
__decorate([
|
23
|
-
test()
|
24
|
-
], DbResetsAsExpectedTest, "shouldBeReset", null);
|
25
|
-
__decorate([
|
26
|
-
seed('good', 1)
|
27
|
-
], DbResetsAsExpectedTest, "doesNothing", null);
|
28
|
-
StoreFixture.setStore('good', GoodStore);
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import { AbstractStore } from '@sprucelabs/data-stores';
|
2
|
-
import { SpruceSchemas } from '@sprucelabs/mercury-types';
|
3
|
-
import { StoreSeedOptions } from '../../../types/store.types';
|
4
|
-
declare const dummySchema: {
|
5
|
-
id: string;
|
6
|
-
fields: {
|
7
|
-
id: {
|
8
|
-
type: "id";
|
9
|
-
};
|
10
|
-
};
|
11
|
-
};
|
12
|
-
type DummySchema = typeof dummySchema;
|
13
|
-
export declare class DummyStore extends AbstractStore<DummySchema> {
|
14
|
-
name: string;
|
15
|
-
protected collectionName: string;
|
16
|
-
protected createSchema: {
|
17
|
-
id: string;
|
18
|
-
fields: {
|
19
|
-
id: {
|
20
|
-
type: "id";
|
21
|
-
};
|
22
|
-
};
|
23
|
-
};
|
24
|
-
protected updateSchema: {
|
25
|
-
id: string;
|
26
|
-
fields: {
|
27
|
-
id: {
|
28
|
-
type: "id";
|
29
|
-
};
|
30
|
-
};
|
31
|
-
};
|
32
|
-
protected fullSchema: {
|
33
|
-
id: string;
|
34
|
-
fields: {
|
35
|
-
id: {
|
36
|
-
type: "id";
|
37
|
-
};
|
38
|
-
};
|
39
|
-
};
|
40
|
-
protected databaseSchema: {
|
41
|
-
id: string;
|
42
|
-
fields: {
|
43
|
-
id: {
|
44
|
-
type: "id";
|
45
|
-
};
|
46
|
-
};
|
47
|
-
};
|
48
|
-
static lastFakedOwner?: SpruceSchemas.Spruce.v2020_07_22.Person;
|
49
|
-
static seedCb?: () => Promise<void> | void;
|
50
|
-
static wasSeedInvoked: boolean;
|
51
|
-
static seedOptions: {};
|
52
|
-
static Store(options: any): DummyStore;
|
53
|
-
seed(options: StoreSeedOptions): Promise<void>;
|
54
|
-
}
|
55
|
-
export {};
|
@@ -1,43 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import { AbstractStore } from '@sprucelabs/data-stores';
|
11
|
-
import { buildSchema } from '@sprucelabs/schema';
|
12
|
-
const dummySchema = buildSchema({
|
13
|
-
id: 'dummy',
|
14
|
-
fields: {
|
15
|
-
id: {
|
16
|
-
type: 'id',
|
17
|
-
},
|
18
|
-
},
|
19
|
-
});
|
20
|
-
export class DummyStore extends AbstractStore {
|
21
|
-
constructor() {
|
22
|
-
super(...arguments);
|
23
|
-
this.name = 'Dummy!';
|
24
|
-
this.collectionName = 'dummies';
|
25
|
-
this.createSchema = dummySchema;
|
26
|
-
this.updateSchema = dummySchema;
|
27
|
-
this.fullSchema = dummySchema;
|
28
|
-
this.databaseSchema = dummySchema;
|
29
|
-
}
|
30
|
-
static Store(options) {
|
31
|
-
return new this(options);
|
32
|
-
}
|
33
|
-
seed(options) {
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
35
|
-
var _a;
|
36
|
-
DummyStore.wasSeedInvoked = true;
|
37
|
-
DummyStore.seedOptions = options;
|
38
|
-
yield ((_a = DummyStore.seedCb) === null || _a === void 0 ? void 0 : _a.call(DummyStore));
|
39
|
-
});
|
40
|
-
}
|
41
|
-
}
|
42
|
-
DummyStore.wasSeedInvoked = false;
|
43
|
-
DummyStore.seedOptions = {};
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import AbstractSpruceTest from '@sprucelabs/test-utils';
|
2
|
-
declare module '@sprucelabs/data-stores/build/types/stores.types' {
|
3
|
-
interface StoreMap {
|
4
|
-
good: any;
|
5
|
-
}
|
6
|
-
}
|
7
|
-
export default class StoreFixtureTest extends AbstractSpruceTest {
|
8
|
-
private static originalDestroy;
|
9
|
-
private static originalAfterEach;
|
10
|
-
protected static beforeAll(): Promise<void>;
|
11
|
-
protected static beforeEach(): Promise<void>;
|
12
|
-
protected static canGetFixture(): Promise<void>;
|
13
|
-
protected static canGetFunctioningStores(): Promise<void>;
|
14
|
-
protected static beforeAllCallsBeforeAllOnDatabaseFixture(): Promise<void>;
|
15
|
-
protected static beforeEachCallsDestroyOnDatabaseFixture(): Promise<void>;
|
16
|
-
protected static afterEachCallsAfterEachOnDatabaseFixture(): Promise<void>;
|
17
|
-
protected static storeLoaderUsesNewInstanceOfDbEachRun(): Promise<void>;
|
18
|
-
protected static storeFixtureCallsResetOnStoreFactory(): Promise<void>;
|
19
|
-
protected static callsBeforeEachOnCursorFaker(): Promise<void>;
|
20
|
-
protected static canGetStore(): Promise<void>;
|
21
|
-
private static setStoreDirToOneGoodStore;
|
22
|
-
private static FixtureFactory;
|
23
|
-
}
|