@sprucelabs/spruce-cli 17.1.40 → 17.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/build/__tests__/behavioral/AddingADependency.test.js +10 -12
- package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
- package/build/__tests__/behavioral/BlockingCommands.test.js +3 -5
- package/build/__tests__/behavioral/BlockingCommands.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingTheCli.test.js +3 -3
- package/build/__tests__/behavioral/BootingTheCli.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js +7 -7
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js.map +1 -1
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js +13 -13
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js.map +1 -1
- package/build/__tests__/behavioral/CreatingSchemasWithGenerics.test.js +10 -10
- package/build/__tests__/behavioral/CreatingSchemasWithGenerics.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingASkill.test.js +32 -34
- package/build/__tests__/behavioral/DeployingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingToSandbox.test.js +15 -17
- package/build/__tests__/behavioral/DeployingToSandbox.test.js.map +1 -1
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js +11 -13
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
- package/build/__tests__/behavioral/GettingCliVersion.test.js +4 -4
- package/build/__tests__/behavioral/GettingCliVersion.test.js.map +1 -1
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js +11 -13
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/ListeningToCoreEvents.test.js +4 -4
- package/build/__tests__/behavioral/ListeningToCoreEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/LoggingInAsASkill.test.js +14 -16
- package/build/__tests__/behavioral/LoggingInAsASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/ManagingDependencies.test.js +9 -9
- package/build/__tests__/behavioral/ManagingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js +3 -3
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js.map +1 -1
- package/build/__tests__/behavioral/RebuildingASkill.test.js +4 -6
- package/build/__tests__/behavioral/RebuildingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js +4 -4
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringEventsOnBoot.test.js +7 -7
- package/build/__tests__/behavioral/RegisteringEventsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringGlobalEvents.test.js +11 -11
- package/build/__tests__/behavioral/RegisteringGlobalEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringSkillViewOnBoot.test.js +6 -6
- package/build/__tests__/behavioral/RegisteringSkillViewOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js +5 -5
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js +10 -12
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingRemote.test.js +9 -9
- package/build/__tests__/behavioral/SettingRemote.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpASkillForTesting.test.js +10 -10
- package/build/__tests__/behavioral/SettingUpASkillForTesting.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpSchemasForModuleDistribution.test.js +29 -31
- package/build/__tests__/behavioral/SettingUpSchemasForModuleDistribution.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpVscode.test.js +10 -10
- package/build/__tests__/behavioral/SettingUpVscode.test.js.map +1 -1
- package/build/__tests__/behavioral/SyncingEventsOnlyFromDependencies.test.js +13 -13
- package/build/__tests__/behavioral/SyncingEventsOnlyFromDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/TestReporterSettingsRemembered.test.js +6 -6
- package/build/__tests__/behavioral/TestReporterSettingsRemembered.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingAConversation.test.js +17 -17
- package/build/__tests__/behavioral/TestingAConversation.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingDataStores.test.js +13 -13
- package/build/__tests__/behavioral/TestingDataStores.test.js.map +1 -1
- package/build/__tests__/behavioral/WatchingSkillViews.test.js +15 -15
- package/build/__tests__/behavioral/WatchingSkillViews.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js +15 -15
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js +8 -8
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js +32 -32
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js +4 -6
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js.map +1 -1
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +25 -25
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.js +29 -31
- package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +26 -28
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js +22 -22
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js +38 -38
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js +7 -7
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js +6 -6
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js +4 -4
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js +3 -5
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js +6 -6
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js +6 -6
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js.map +1 -1
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js +6 -6
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js +3 -3
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js +14 -16
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js.map +1 -1
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js +7 -7
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js.map +1 -1
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js +8 -8
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js +23 -25
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js +7 -7
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js +6 -6
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js +18 -18
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js +7 -7
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js +62 -64
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js +6 -8
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js +4 -6
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.d.ts +1 -1
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js +4 -4
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/BootingASkill.test.js +12 -12
- package/build/__tests__/behavioral/skill/BootingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js +5 -5
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js +12 -14
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js +29 -29
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js +26 -28
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js +8 -10
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/CreatingATest.test.js +10 -10
- package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/RunningTests.test.js +8 -10
- package/build/__tests__/behavioral/tests/RunningTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +17 -17
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js +3 -5
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js +8 -8
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js +7 -7
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js +6 -6
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js +15 -15
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js +24 -24
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js +22 -22
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js +10 -10
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js +9 -9
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js +4 -4
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js +9 -9
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js +28 -30
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingATheme.test.js +9 -11
- package/build/__tests__/behavioral/views/CreatingATheme.test.js.map +1 -1
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +8 -8
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/views/SettingUpViews.test.js +5 -5
- package/build/__tests__/behavioral/views/SettingUpViews.test.js.map +1 -1
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js +12 -12
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js.map +1 -1
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js +10 -10
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter.test.js +5 -5
- package/build/__tests__/implementation/ActionExecuter.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter2.test.js +30 -30
- package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter3.test.js +3 -5
- package/build/__tests__/implementation/ActionExecuter3.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter4.test.js +2 -4
- package/build/__tests__/implementation/ActionExecuter4.test.js.map +1 -1
- package/build/__tests__/implementation/ArgParser.test.d.ts +1 -1
- package/build/__tests__/implementation/ArgParser.test.js +7 -7
- package/build/__tests__/implementation/ArgParser.test.js.map +1 -1
- package/build/__tests__/implementation/BuildService.test.js +4 -4
- package/build/__tests__/implementation/BuildService.test.js.map +1 -1
- package/build/__tests__/implementation/BulkImporting.test.d.ts +1 -1
- package/build/__tests__/implementation/BulkImporting.test.js +20 -22
- package/build/__tests__/implementation/BulkImporting.test.js.map +1 -1
- package/build/__tests__/implementation/CachingImports.test.js +3 -3
- package/build/__tests__/implementation/CachingImports.test.js.map +1 -1
- package/build/__tests__/implementation/CommandOptionBuilder.test.js +12 -12
- package/build/__tests__/implementation/CommandOptionBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.d.ts +1 -1
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js +13 -13
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js.map +1 -1
- package/build/__tests__/implementation/DataStoreStore.test.js +16 -18
- package/build/__tests__/implementation/DataStoreStore.test.js.map +1 -1
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js +6 -6
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js.map +1 -1
- package/build/__tests__/implementation/EventContractCleanerUtil.test.d.ts +1 -1
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js +7 -7
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js.map +1 -1
- package/build/__tests__/implementation/EventStore.test.js +27 -29
- package/build/__tests__/implementation/EventStore.test.js.map +1 -1
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js +12 -12
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js +23 -23
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureFixture.test.js +7 -7
- package/build/__tests__/implementation/FeatureFixture.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureInstaller.test.js +8 -8
- package/build/__tests__/implementation/FeatureInstaller.test.js.map +1 -1
- package/build/__tests__/implementation/FeaturesUtil.test.d.ts +1 -1
- package/build/__tests__/implementation/FeaturesUtil.test.js +4 -4
- package/build/__tests__/implementation/FeaturesUtil.test.js.map +1 -1
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js +11 -11
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/GlobalEmitter.js +3 -3
- package/build/__tests__/implementation/GlobalEmitter.js.map +1 -1
- package/build/__tests__/implementation/Introspection.test.js +4 -4
- package/build/__tests__/implementation/Introspection.test.js.map +1 -1
- package/build/__tests__/implementation/JestJsonParser.test.d.ts +1 -1
- package/build/__tests__/implementation/JestJsonParser.test.js +31 -31
- package/build/__tests__/implementation/JestJsonParser.test.js.map +1 -1
- package/build/__tests__/implementation/LintService.test.js +3 -3
- package/build/__tests__/implementation/LintService.test.js.map +1 -1
- package/build/__tests__/implementation/ListenerStore.test.js +3 -3
- package/build/__tests__/implementation/ListenerStore.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js +9 -9
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js +17 -17
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingStore.test.js +14 -14
- package/build/__tests__/implementation/OnboardingStore.test.js.map +1 -1
- package/build/__tests__/implementation/OrganizationStore.test.js +10 -10
- package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
- package/build/__tests__/implementation/ParentTestFinder.test.js +6 -6
- package/build/__tests__/implementation/ParentTestFinder.test.js.map +1 -1
- package/build/__tests__/implementation/PkgService.test.js +8 -8
- package/build/__tests__/implementation/PkgService.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaStore.test.js +30 -32
- package/build/__tests__/implementation/SchemaStore.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js +10 -10
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js +13 -13
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js.map +1 -1
- package/build/__tests__/implementation/ServiceFactory.test.js +3 -3
- package/build/__tests__/implementation/ServiceFactory.test.js.map +1 -1
- package/build/__tests__/implementation/SettingUpANodeModule.test.js +4 -6
- package/build/__tests__/implementation/SettingUpANodeModule.test.js.map +1 -1
- package/build/__tests__/implementation/SkillStore.test.js +25 -27
- package/build/__tests__/implementation/SkillStore.test.js.map +1 -1
- package/build/__tests__/implementation/StoreFeature.test.js +4 -4
- package/build/__tests__/implementation/StoreFeature.test.js.map +1 -1
- package/build/__tests__/implementation/TestReporter.test.js +5 -5
- package/build/__tests__/implementation/TestReporter.test.js.map +1 -1
- package/build/__tests__/implementation/TestRunner.test.js +23 -25
- package/build/__tests__/implementation/TestRunner.test.js.map +1 -1
- package/build/__tests__/implementation/ValueTypeMapping.test.js +4 -4
- package/build/__tests__/implementation/ValueTypeMapping.test.js.map +1 -1
- package/build/__tests__/implementation/Widgets.test.js +10 -10
- package/build/__tests__/implementation/Widgets.test.js.map +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest.d.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest2.d.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest2.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/deeper/AbstractBananaTest.d.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/deeper/AbstractBananaTest.ts +1 -1
- package/build/features/onboard/templates/ManagingTodos.test.ts.hbs +1 -1
- package/build/features/test/TestLogItemGenerator.js +2 -2
- package/build/features/test/TestLogItemGenerator.js.map +1 -1
- package/build/interfaces/SpyInterface.js +5 -5
- package/build/interfaces/SpyInterface.js.map +1 -1
- package/build/tests/AbstractCliTest.d.ts +1 -1
- package/build/tests/AbstractCliTest.js +11 -11
- package/build/tests/AbstractCliTest.js.map +1 -1
- package/build/tests/AbstractSchemaTest.js +4 -4
- package/build/tests/AbstractSchemaTest.js.map +1 -1
- package/build/tests/utilities/test.utility.js +6 -6
- package/build/tests/utilities/test.utility.js.map +1 -1
- package/build/tests/utilities/uiAssert.utility.js +6 -6
- package/build/tests/utilities/uiAssert.utility.js.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/behavioral/AddingADependency.test.ts +1 -1
- package/src/__tests__/behavioral/BlockingCommands.test.ts +1 -1
- package/src/__tests__/behavioral/BootingTheCli.test.ts +1 -1
- package/src/__tests__/behavioral/BootingWithBadFiles.test.ts +1 -1
- package/src/__tests__/behavioral/CreatingAConversationTopic.test.ts +1 -1
- package/src/__tests__/behavioral/CreatingSchemasWithGenerics.test.ts +1 -1
- package/src/__tests__/behavioral/DeployingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/DeployingToSandbox.test.ts +1 -1
- package/src/__tests__/behavioral/EnablingAndDisablingCache.test.ts +1 -1
- package/src/__tests__/behavioral/GettingCliVersion.test.ts +1 -1
- package/src/__tests__/behavioral/InstallingASkillAtAnOrg.test.ts +1 -1
- package/src/__tests__/behavioral/ListeningToCoreEvents.test.ts +1 -1
- package/src/__tests__/behavioral/LoggingInAsASkill.test.ts +1 -1
- package/src/__tests__/behavioral/ManagingDependencies.test.ts +1 -1
- package/src/__tests__/behavioral/OverridingCommandsInPackageJson.test.ts +1 -1
- package/src/__tests__/behavioral/RebuildingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringConversationsOnBoot.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringEventsOnBoot.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringGlobalEvents.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringSkillViewOnBoot.test.ts +1 -1
- package/src/__tests__/behavioral/RememberingUpgradeSelections.test.ts +1 -1
- package/src/__tests__/behavioral/SettingLogTransportsInASkill.test.ts +1 -1
- package/src/__tests__/behavioral/SettingRemote.test.ts +1 -1
- package/src/__tests__/behavioral/SettingUpASkillForTesting.test.ts +1 -1
- package/src/__tests__/behavioral/SettingUpSchemasForModuleDistribution.test.ts +1 -1
- package/src/__tests__/behavioral/SettingUpVscode.test.ts +1 -1
- package/src/__tests__/behavioral/SyncingEventsOnlyFromDependencies.test.ts +1 -1
- package/src/__tests__/behavioral/TestReporterSettingsRemembered.test.ts +1 -1
- package/src/__tests__/behavioral/TestingAConversation.test.ts +1 -1
- package/src/__tests__/behavioral/TestingDataStores.test.ts +1 -1
- package/src/__tests__/behavioral/WatchingSkillViews.test.ts +1 -1
- package/src/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.ts +1 -1
- package/src/__tests__/behavioral/errors/KeepingErrorClassInSync.test.ts +1 -1
- package/src/__tests__/behavioral/errors/KeepingErrorsInSync.test.ts +1 -1
- package/src/__tests__/behavioral/errors/SettingUpErrors.test.ts +1 -1
- package/src/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.ts +1 -1
- package/src/__tests__/behavioral/events/CreatingAListener.test.ts +1 -1
- package/src/__tests__/behavioral/events/CreatingAnEvent.test.ts +1 -1
- package/src/__tests__/behavioral/events/KeepingEventsInSync.test.ts +1 -1
- package/src/__tests__/behavioral/events/KeepingEventsInSync2.test.ts +1 -1
- package/src/__tests__/behavioral/events/KeepingListenersInSync.test.ts +1 -1
- package/src/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.ts +1 -1
- package/src/__tests__/behavioral/events/SettingUpEvents.test.ts +1 -1
- package/src/__tests__/behavioral/events/SkillEmitsBootEvents.test.ts +1 -1
- package/src/__tests__/behavioral/node/CreatingANodeModule.test.ts +1 -1
- package/src/__tests__/behavioral/onboard/StartingOnboarding.test.ts +1 -1
- package/src/__tests__/behavioral/organization/CreatingAnOrg.test.ts +1 -1
- package/src/__tests__/behavioral/permissions/CreatingPermissions.test.ts +1 -1
- package/src/__tests__/behavioral/person/LoggingInAsPerson.test.ts +1 -1
- package/src/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.ts +1 -1
- package/src/__tests__/behavioral/polish/SettingUpPolish.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/ImportingSchemaImports.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/KeepingSchemasInSync.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/SettingUpSchemas.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/UsingSchemasInCli.test.ts +1 -1
- package/src/__tests__/behavioral/skill/BootingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/skill/CreatingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/skill/RegisteringASkill.test.ts +1 -1
- package/src/__tests__/behavioral/skill/SettingUpASkill.test.ts +1 -1
- package/src/__tests__/behavioral/stores/CreatingADataStore.test.ts +1 -1
- package/src/__tests__/behavioral/stores/KeepingDataStoresInSync.test.ts +1 -1
- package/src/__tests__/behavioral/tests/CreatingATest.test.ts +1 -1
- package/src/__tests__/behavioral/tests/RunningTests.test.ts +1 -1
- package/src/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.ts +1 -1
- package/src/__tests__/behavioral/tests/SettingUpTests.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpdatingDependencies.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpdatingDependencies2.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingANodeModule.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill2.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill3.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill4.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill5.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingWithListeners.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.ts +1 -1
- package/src/__tests__/behavioral/views/CreatingASkillView.test.ts +1 -1
- package/src/__tests__/behavioral/views/CreatingATheme.test.ts +1 -1
- package/src/__tests__/behavioral/views/KeepingViewsInSync.test.ts +1 -1
- package/src/__tests__/behavioral/views/SettingUpViews.test.ts +1 -1
- package/src/__tests__/behavioral/views/TestingViewControllers.test.ts +1 -1
- package/src/__tests__/behavioral/watchers/WatchingForChanges.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter2.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter3.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter4.test.ts +1 -1
- package/src/__tests__/implementation/ArgParser.test.ts +1 -1
- package/src/__tests__/implementation/BuildService.test.ts +1 -1
- package/src/__tests__/implementation/BulkImporting.test.ts +1 -1
- package/src/__tests__/implementation/CachingImports.test.ts +1 -1
- package/src/__tests__/implementation/CommandOptionBuilder.test.ts +1 -1
- package/src/__tests__/implementation/CommanderCommandResultMapper.test.ts +1 -1
- package/src/__tests__/implementation/DataStoreStore.test.ts +1 -1
- package/src/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.ts +1 -1
- package/src/__tests__/implementation/EventContractCleanerUtil.test.ts +1 -1
- package/src/__tests__/implementation/EventStore.test.ts +1 -1
- package/src/__tests__/implementation/EventTemplateItemBuilder.test.ts +1 -1
- package/src/__tests__/implementation/FeatureCommandAttacher.test.ts +1 -1
- package/src/__tests__/implementation/FeatureFixture.test.ts +1 -1
- package/src/__tests__/implementation/FeatureInstaller.test.ts +1 -1
- package/src/__tests__/implementation/FeaturesUtil.test.ts +1 -1
- package/src/__tests__/implementation/FieldTemplateItemBuilder.test.ts +1 -1
- package/src/__tests__/implementation/GlobalEmitter.ts +1 -1
- package/src/__tests__/implementation/Introspection.test.ts +1 -1
- package/src/__tests__/implementation/JestJsonParser.test.ts +1 -1
- package/src/__tests__/implementation/LintService.test.ts +1 -1
- package/src/__tests__/implementation/ListenerStore.test.ts +1 -1
- package/src/__tests__/implementation/OnboardingScriptLoader.test.ts +1 -1
- package/src/__tests__/implementation/OnboardingScriptPlayer.test.ts +1 -1
- package/src/__tests__/implementation/OnboardingStore.test.ts +1 -1
- package/src/__tests__/implementation/OrganizationStore.test.ts +1 -1
- package/src/__tests__/implementation/ParentTestFinder.test.ts +1 -1
- package/src/__tests__/implementation/PkgService.test.ts +1 -1
- package/src/__tests__/implementation/SchemaStore.test.ts +1 -1
- package/src/__tests__/implementation/SchemaTemplateItemBuilder.test.ts +1 -1
- package/src/__tests__/implementation/SchemaValueTypeWriter.test.ts +1 -1
- package/src/__tests__/implementation/ServiceFactory.test.ts +1 -1
- package/src/__tests__/implementation/SettingUpANodeModule.test.ts +1 -1
- package/src/__tests__/implementation/SkillStore.test.ts +1 -1
- package/src/__tests__/implementation/StoreFeature.test.ts +1 -1
- package/src/__tests__/implementation/TestReporter.test.ts +1 -1
- package/src/__tests__/implementation/TestRunner.test.ts +1 -1
- package/src/__tests__/implementation/ValueTypeMapping.test.ts +1 -1
- package/src/__tests__/implementation/Widgets.test.ts +1 -1
- package/src/__tests__/testDirsAndFiles/abstract_tests/AbstractTest.ts +1 -1
- package/src/__tests__/testDirsAndFiles/abstract_tests/AbstractTest2.ts +1 -1
- package/src/__tests__/testDirsAndFiles/abstract_tests/deeper/AbstractBananaTest.ts +1 -1
- package/src/features/onboard/templates/ManagingTodos.test.ts.hbs +1 -1
- package/src/features/test/TestLogItemGenerator.ts +1 -1
- package/src/interfaces/SpyInterface.ts +1 -1
- package/src/tests/AbstractCliTest.ts +1 -1
- package/src/tests/AbstractSchemaTest.ts +1 -1
- package/src/tests/utilities/test.utility.ts +1 -1
- package/src/tests/utilities/uiAssert.utility.ts +1 -1
|
@@ -23,8 +23,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
23
23
|
|
|
24
24
|
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
25
25
|
|
|
26
|
-
var _test = require("@sprucelabs/test");
|
|
27
|
-
|
|
28
26
|
var _testUtils = require("@sprucelabs/test-utils");
|
|
29
27
|
|
|
30
28
|
var _AbstractCliTest2 = _interopRequireDefault(require("../../tests/AbstractCliTest"));
|
|
@@ -35,7 +33,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
35
33
|
|
|
36
34
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
35
|
|
|
38
|
-
var SkillStoreTest = (_dec = (0,
|
|
36
|
+
var SkillStoreTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), _dec4 = (0, _testUtils.test)(), _dec5 = (0, _testUtils.test)(), _dec6 = (0, _testUtils.test)(), _dec7 = (0, _testUtils.test)(), _dec8 = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractCliTest) {
|
|
39
37
|
(0, _inherits2["default"])(SkillStoreTest, _AbstractCliTest);
|
|
40
38
|
|
|
41
39
|
var _super = _createSuper(SkillStoreTest);
|
|
@@ -53,7 +51,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
53
51
|
while (1) {
|
|
54
52
|
switch (_context.prev = _context.next) {
|
|
55
53
|
case 0:
|
|
56
|
-
|
|
54
|
+
_testUtils.assert.isTruthy(this.Store('skill'));
|
|
57
55
|
|
|
58
56
|
case 1:
|
|
59
57
|
case "end":
|
|
@@ -77,7 +75,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
77
75
|
while (1) {
|
|
78
76
|
switch (_context2.prev = _context2.next) {
|
|
79
77
|
case 0:
|
|
80
|
-
|
|
78
|
+
_testUtils.assert.isFunction(this.Store('skill').register);
|
|
81
79
|
|
|
82
80
|
case 1:
|
|
83
81
|
case "end":
|
|
@@ -105,7 +103,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
105
103
|
switch (_context3.prev = _context3.next) {
|
|
106
104
|
case 0:
|
|
107
105
|
_context3.next = 2;
|
|
108
|
-
return
|
|
106
|
+
return _testUtils.assert.doesThrowAsync(function () {
|
|
109
107
|
return _this.Store('skill').register({
|
|
110
108
|
name: 'awesome skill',
|
|
111
109
|
slug: 'awesome-skill'
|
|
@@ -143,7 +141,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
143
141
|
switch (_context4.prev = _context4.next) {
|
|
144
142
|
case 0:
|
|
145
143
|
_context4.next = 2;
|
|
146
|
-
return
|
|
144
|
+
return _testUtils.assert.doesThrowAsync(function () {
|
|
147
145
|
return _this2.Store('skill').loadCurrentSkill();
|
|
148
146
|
});
|
|
149
147
|
|
|
@@ -178,7 +176,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
178
176
|
switch (_context5.prev = _context5.next) {
|
|
179
177
|
case 0:
|
|
180
178
|
_context5.next = 2;
|
|
181
|
-
return
|
|
179
|
+
return _testUtils.assert.doesThrowAsync(function () {
|
|
182
180
|
return _this3.Store('skill').isCurrentSkillRegistered();
|
|
183
181
|
});
|
|
184
182
|
|
|
@@ -220,7 +218,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
220
218
|
case 4:
|
|
221
219
|
namespace = _context6.sent;
|
|
222
220
|
|
|
223
|
-
|
|
221
|
+
_testUtils.assert.isEqual(namespace, 'TestSkill');
|
|
224
222
|
|
|
225
223
|
case 6:
|
|
226
224
|
case "end":
|
|
@@ -265,7 +263,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
265
263
|
case 10:
|
|
266
264
|
namespace = _context7.sent;
|
|
267
265
|
|
|
268
|
-
|
|
266
|
+
_testUtils.assert.isEqual(namespace, 'NewNamespace');
|
|
269
267
|
|
|
270
268
|
case 12:
|
|
271
269
|
case "end":
|
|
@@ -308,7 +306,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
308
306
|
case 8:
|
|
309
307
|
isRegistered = _context8.sent;
|
|
310
308
|
|
|
311
|
-
|
|
309
|
+
_testUtils.assert.isFalse(isRegistered);
|
|
312
310
|
|
|
313
311
|
_context8.next = 12;
|
|
314
312
|
return skillStore.register({
|
|
@@ -319,15 +317,15 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
319
317
|
case 12:
|
|
320
318
|
skill = _context8.sent;
|
|
321
319
|
|
|
322
|
-
|
|
320
|
+
_testUtils.assert.isTruthy(skill);
|
|
323
321
|
|
|
324
|
-
|
|
322
|
+
_testUtils.assert.isEqual(skill.name, 'awesome skill');
|
|
325
323
|
|
|
326
|
-
|
|
324
|
+
_testUtils.assert.isEqual(skill.slug, slug);
|
|
327
325
|
|
|
328
|
-
|
|
326
|
+
_testUtils.assert.isString(skill.apiKey);
|
|
329
327
|
|
|
330
|
-
|
|
328
|
+
_testUtils.assert.isString(skill.id);
|
|
331
329
|
|
|
332
330
|
_context8.next = 20;
|
|
333
331
|
return this.connectToApi();
|
|
@@ -343,7 +341,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
343
341
|
case 23:
|
|
344
342
|
results = _context8.sent;
|
|
345
343
|
|
|
346
|
-
|
|
344
|
+
_testUtils.assert.isEqual((_results$skill = results.skill) === null || _results$skill === void 0 ? void 0 : _results$skill.id, skill.id);
|
|
347
345
|
|
|
348
346
|
_context8.next = 27;
|
|
349
347
|
return skillStore.isCurrentSkillRegistered();
|
|
@@ -351,7 +349,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
351
349
|
case 27:
|
|
352
350
|
isRegistered = _context8.sent;
|
|
353
351
|
|
|
354
|
-
|
|
352
|
+
_testUtils.assert.isTrue(isRegistered);
|
|
355
353
|
|
|
356
354
|
_context8.next = 31;
|
|
357
355
|
return skillStore.loadCurrentSkill();
|
|
@@ -359,24 +357,24 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
359
357
|
case 31:
|
|
360
358
|
currentSkill = _context8.sent;
|
|
361
359
|
|
|
362
|
-
|
|
360
|
+
_testUtils.assert.isEqual(currentSkill.id, skill.id);
|
|
363
361
|
|
|
364
|
-
|
|
362
|
+
_testUtils.assert.isTrue(currentSkill.isRegistered);
|
|
365
363
|
|
|
366
|
-
|
|
364
|
+
_testUtils.assert.isEqual(currentSkill.name, 'awesome skill');
|
|
367
365
|
|
|
368
|
-
|
|
366
|
+
_testUtils.assert.isEqual(currentSkill.slug, slug);
|
|
369
367
|
|
|
370
|
-
|
|
368
|
+
_testUtils.assert.isEqual(currentSkill.apiKey, skill.apiKey);
|
|
371
369
|
|
|
372
370
|
env = this.Service('env');
|
|
373
371
|
|
|
374
|
-
|
|
372
|
+
_testUtils.assert.isEqual(env.get('SKILL_ID'), skill.id);
|
|
375
373
|
|
|
376
|
-
|
|
374
|
+
_testUtils.assert.isEqual(env.get('SKILL_API_KEY'), skill.apiKey);
|
|
377
375
|
|
|
378
376
|
_context8.next = 42;
|
|
379
|
-
return
|
|
377
|
+
return _testUtils.assert.doesThrowAsync(function () {
|
|
380
378
|
return skillStore.setCurrentSkillsNamespace('test');
|
|
381
379
|
});
|
|
382
380
|
|
|
@@ -388,7 +386,7 @@ var SkillStoreTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
388
386
|
pkg = this.Service('pkg');
|
|
389
387
|
namespace = pkg.get('skill.namespace');
|
|
390
388
|
|
|
391
|
-
|
|
389
|
+
_testUtils.assert.isEqual(namespace, slug);
|
|
392
390
|
|
|
393
391
|
case 47:
|
|
394
392
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillStore.test.js","names":["SkillStoreTest","test","assert","isTruthy","Store","isFunction","register","doesThrowAsync","name","slug","err","errorAssert","assertError","loadCurrentSkill","isCurrentSkillRegistered","FeatureFixture","installCachedFeatures","loadCurrentSkillsNamespace","namespace","isEqual","store","setCurrentSkillsNamespace","Date","getTime","people","loginAsDemoPerson","skillStore","isRegistered","isFalse","skill","isString","apiKey","id","connectToApi","client","authenticate","skillId","results","isTrue","currentSkill","env","Service","get","pkg","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/SkillStore.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class SkillStoreTest extends AbstractCliTest {\n\t@test()\n\tprotected static async canInstantiateSkillStore() {\n\t\tassert.isTruthy(this.Store('skill'))\n\t}\n\n\t@test()\n\tprotected static async hasRegisterMethod() {\n\t\tassert.isFunction(this.Store('skill').register)\n\t}\n\n\t@test()\n\tprotected static async cantRegisterIfNotInSkill() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.Store('skill').register({\n\t\t\t\tname: 'awesome skill',\n\t\t\t\tslug: 'awesome-skill',\n\t\t\t})\n\t\t)\n\t\terrorAssert.assertError(err, 'DIRECTORY_NOT_SKILL')\n\t}\n\n\t@test()\n\tprotected static async cantLoadcurrentSkillIfNotInSkill() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.Store('skill').loadCurrentSkill()\n\t\t)\n\t\terrorAssert.assertError(err, 'DIRECTORY_NOT_SKILL')\n\t}\n\n\t@test()\n\tprotected static async cantCheckIfSkillIsRegisteredNotInSkill() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.Store('skill').isCurrentSkillRegistered()\n\t\t)\n\t\terrorAssert.assertError(err, 'DIRECTORY_NOT_SKILL')\n\t}\n\n\t@test()\n\tprotected static async canGetNamespace() {\n\t\tawait this.FeatureFixture().installCachedFeatures('skills')\n\n\t\tconst namespace = await this.Store('skill').loadCurrentSkillsNamespace()\n\t\tassert.isEqual(namespace, 'TestSkill')\n\t}\n\n\t@test()\n\tprotected static async canSetNamespace() {\n\t\tawait this.FeatureFixture().installCachedFeatures('skills')\n\n\t\tconst store = this.Store('skill')\n\t\tlet namespace = await store.loadCurrentSkillsNamespace()\n\n\t\tawait this.Store('skill').setCurrentSkillsNamespace('new-namespace')\n\n\t\tnamespace = await store.loadCurrentSkillsNamespace()\n\t\tassert.isEqual(namespace, 'NewNamespace')\n\t}\n\n\t@test()\n\tprotected static async canRegister() {\n\t\tawait this.FeatureFixture().installCachedFeatures('skills')\n\n\t\tconst slug = `awesome-skill-${new Date().getTime()}`\n\t\tawait this.people.loginAsDemoPerson()\n\n\t\tconst skillStore = this.Store('skill')\n\n\t\tlet isRegistered = await skillStore.isCurrentSkillRegistered()\n\t\tassert.isFalse(isRegistered)\n\n\t\tconst skill = await skillStore.register({\n\t\t\tname: 'awesome skill',\n\t\t\tslug,\n\t\t})\n\n\t\tassert.isTruthy(skill)\n\t\tassert.isEqual(skill.name, 'awesome skill')\n\t\tassert.isEqual(skill.slug, slug)\n\t\tassert.isString(skill.apiKey)\n\t\tassert.isString(skill.id)\n\n\t\tconst client = await this.connectToApi()\n\t\tconst results = await client.authenticate({\n\t\t\tskillId: skill.id,\n\t\t\tapiKey: skill.apiKey,\n\t\t})\n\n\t\tassert.isEqual(results.skill?.id, skill.id)\n\n\t\tisRegistered = await skillStore.isCurrentSkillRegistered()\n\t\tassert.isTrue(isRegistered)\n\n\t\tconst currentSkill = await skillStore.loadCurrentSkill()\n\n\t\tassert.isEqual(currentSkill.id, skill.id)\n\t\tassert.isTrue(currentSkill.isRegistered)\n\t\tassert.isEqual(currentSkill.name, 'awesome skill')\n\t\tassert.isEqual(currentSkill.slug, slug)\n\t\tassert.isEqual(currentSkill.apiKey, skill.apiKey)\n\n\t\tconst env = this.Service('env')\n\n\t\tassert.isEqual(env.get('SKILL_ID'), skill.id)\n\t\tassert.isEqual(env.get('SKILL_API_KEY'), skill.apiKey)\n\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tskillStore.setCurrentSkillsNamespace('test')\n\t\t)\n\n\t\terrorAssert.assertError(err, 'GENERIC')\n\n\t\tconst pkg = this.Service('pkg')\n\t\tconst namespace = pkg.get('skill.namespace')\n\t\tassert.isEqual(namespace, slug)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;
|
|
1
|
+
{"version":3,"file":"SkillStore.test.js","names":["SkillStoreTest","test","assert","isTruthy","Store","isFunction","register","doesThrowAsync","name","slug","err","errorAssert","assertError","loadCurrentSkill","isCurrentSkillRegistered","FeatureFixture","installCachedFeatures","loadCurrentSkillsNamespace","namespace","isEqual","store","setCurrentSkillsNamespace","Date","getTime","people","loginAsDemoPerson","skillStore","isRegistered","isFalse","skill","isString","apiKey","id","connectToApi","client","authenticate","skillId","results","isTrue","currentSkill","env","Service","get","pkg","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/SkillStore.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class SkillStoreTest extends AbstractCliTest {\n\t@test()\n\tprotected static async canInstantiateSkillStore() {\n\t\tassert.isTruthy(this.Store('skill'))\n\t}\n\n\t@test()\n\tprotected static async hasRegisterMethod() {\n\t\tassert.isFunction(this.Store('skill').register)\n\t}\n\n\t@test()\n\tprotected static async cantRegisterIfNotInSkill() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.Store('skill').register({\n\t\t\t\tname: 'awesome skill',\n\t\t\t\tslug: 'awesome-skill',\n\t\t\t})\n\t\t)\n\t\terrorAssert.assertError(err, 'DIRECTORY_NOT_SKILL')\n\t}\n\n\t@test()\n\tprotected static async cantLoadcurrentSkillIfNotInSkill() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.Store('skill').loadCurrentSkill()\n\t\t)\n\t\terrorAssert.assertError(err, 'DIRECTORY_NOT_SKILL')\n\t}\n\n\t@test()\n\tprotected static async cantCheckIfSkillIsRegisteredNotInSkill() {\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tthis.Store('skill').isCurrentSkillRegistered()\n\t\t)\n\t\terrorAssert.assertError(err, 'DIRECTORY_NOT_SKILL')\n\t}\n\n\t@test()\n\tprotected static async canGetNamespace() {\n\t\tawait this.FeatureFixture().installCachedFeatures('skills')\n\n\t\tconst namespace = await this.Store('skill').loadCurrentSkillsNamespace()\n\t\tassert.isEqual(namespace, 'TestSkill')\n\t}\n\n\t@test()\n\tprotected static async canSetNamespace() {\n\t\tawait this.FeatureFixture().installCachedFeatures('skills')\n\n\t\tconst store = this.Store('skill')\n\t\tlet namespace = await store.loadCurrentSkillsNamespace()\n\n\t\tawait this.Store('skill').setCurrentSkillsNamespace('new-namespace')\n\n\t\tnamespace = await store.loadCurrentSkillsNamespace()\n\t\tassert.isEqual(namespace, 'NewNamespace')\n\t}\n\n\t@test()\n\tprotected static async canRegister() {\n\t\tawait this.FeatureFixture().installCachedFeatures('skills')\n\n\t\tconst slug = `awesome-skill-${new Date().getTime()}`\n\t\tawait this.people.loginAsDemoPerson()\n\n\t\tconst skillStore = this.Store('skill')\n\n\t\tlet isRegistered = await skillStore.isCurrentSkillRegistered()\n\t\tassert.isFalse(isRegistered)\n\n\t\tconst skill = await skillStore.register({\n\t\t\tname: 'awesome skill',\n\t\t\tslug,\n\t\t})\n\n\t\tassert.isTruthy(skill)\n\t\tassert.isEqual(skill.name, 'awesome skill')\n\t\tassert.isEqual(skill.slug, slug)\n\t\tassert.isString(skill.apiKey)\n\t\tassert.isString(skill.id)\n\n\t\tconst client = await this.connectToApi()\n\t\tconst results = await client.authenticate({\n\t\t\tskillId: skill.id,\n\t\t\tapiKey: skill.apiKey,\n\t\t})\n\n\t\tassert.isEqual(results.skill?.id, skill.id)\n\n\t\tisRegistered = await skillStore.isCurrentSkillRegistered()\n\t\tassert.isTrue(isRegistered)\n\n\t\tconst currentSkill = await skillStore.loadCurrentSkill()\n\n\t\tassert.isEqual(currentSkill.id, skill.id)\n\t\tassert.isTrue(currentSkill.isRegistered)\n\t\tassert.isEqual(currentSkill.name, 'awesome skill')\n\t\tassert.isEqual(currentSkill.slug, slug)\n\t\tassert.isEqual(currentSkill.apiKey, skill.apiKey)\n\n\t\tconst env = this.Service('env')\n\n\t\tassert.isEqual(env.get('SKILL_ID'), skill.id)\n\t\tassert.isEqual(env.get('SKILL_API_KEY'), skill.apiKey)\n\n\t\tconst err = await assert.doesThrowAsync(() =>\n\t\t\tskillStore.setCurrentSkillsNamespace('test')\n\t\t)\n\n\t\terrorAssert.assertError(err, 'GENERIC')\n\n\t\tconst pkg = this.Service('pkg')\n\t\tconst namespace = pkg.get('skill.namespace')\n\t\tassert.isEqual(namespace, slug)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;;;;;;;IAEqBA,c,WACnB,IAAAC,eAAA,G,UAKA,IAAAA,eAAA,G,UAKA,IAAAA,eAAA,G,UAWA,IAAAA,eAAA,G,UAQA,IAAAA,eAAA,G,UAQA,IAAAA,eAAA,G,UAQA,IAAAA,eAAA,G,UAaA,IAAAA,eAAA,G;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time/helpers/applyDecoratedDescriptor"));
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
27
27
|
|
|
28
28
|
var _CommandService = _interopRequireDefault(require("../../services/CommandService"));
|
|
29
29
|
|
|
@@ -35,7 +35,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
35
35
|
|
|
36
36
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
37
|
|
|
38
|
-
var StoreFeatureTest = (_dec = (0,
|
|
38
|
+
var StoreFeatureTest = (_dec = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractCliTest) {
|
|
39
39
|
(0, _inherits2["default"])(StoreFeatureTest, _AbstractCliTest);
|
|
40
40
|
|
|
41
41
|
var _super = _createSuper(StoreFeatureTest);
|
|
@@ -99,7 +99,7 @@ var StoreFeatureTest = (_dec = (0, _test.test)(), (_class = /*#__PURE__*/functio
|
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
case 9:
|
|
102
|
-
|
|
102
|
+
_testUtils.assert.isEqual(hitCount, 0);
|
|
103
103
|
|
|
104
104
|
_context2.next = 12;
|
|
105
105
|
return emitter.emit('feature.did-execute', {
|
|
@@ -109,7 +109,7 @@ var StoreFeatureTest = (_dec = (0, _test.test)(), (_class = /*#__PURE__*/functio
|
|
|
109
109
|
});
|
|
110
110
|
|
|
111
111
|
case 12:
|
|
112
|
-
|
|
112
|
+
_testUtils.assert.isEqual(hitCount, 1);
|
|
113
113
|
|
|
114
114
|
case 13:
|
|
115
115
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreFeature.test.js","names":["StoreFeatureTest","test","FeatureFixture","installCachedFeatures","CommandService","fakeCommand","code","hitCount","emitter","getEmitter","on","featureCode","actionCode","emit","assert","isEqual","results","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/StoreFeature.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport CommandService from '../../services/CommandService'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class StoreFeatureTest extends AbstractCliTest {\n\t@test()\n\tprotected static async syncsOnWillExecute() {\n\t\tawait this.FeatureFixture().installCachedFeatures('stores')\n\n\t\tCommandService.fakeCommand(/yarn/, {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tlet hitCount = 0\n\t\tconst emitter = this.getEmitter()\n\t\tawait emitter.on(\n\t\t\t'feature.will-execute',\n\t\t\tasync ({ featureCode, actionCode }) => {\n\t\t\t\tif (featureCode === 'store' && actionCode === 'sync') {\n\t\t\t\t\thitCount++\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\n\t\tawait emitter.emit('feature.will-execute', {\n\t\t\tfeatureCode: 'node',\n\t\t\tactionCode: 'upgrade',\n\t\t})\n\n\t\tassert.isEqual(hitCount, 0)\n\n\t\tawait emitter.emit('feature.did-execute', {\n\t\t\tfeatureCode: 'node',\n\t\t\tactionCode: 'upgrade',\n\t\t\tresults: {},\n\t\t})\n\n\t\tassert.isEqual(hitCount, 1)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;IAEqBA,gB,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"StoreFeature.test.js","names":["StoreFeatureTest","test","FeatureFixture","installCachedFeatures","CommandService","fakeCommand","code","hitCount","emitter","getEmitter","on","featureCode","actionCode","emit","assert","isEqual","results","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/StoreFeature.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport CommandService from '../../services/CommandService'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class StoreFeatureTest extends AbstractCliTest {\n\t@test()\n\tprotected static async syncsOnWillExecute() {\n\t\tawait this.FeatureFixture().installCachedFeatures('stores')\n\n\t\tCommandService.fakeCommand(/yarn/, {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tlet hitCount = 0\n\t\tconst emitter = this.getEmitter()\n\t\tawait emitter.on(\n\t\t\t'feature.will-execute',\n\t\t\tasync ({ featureCode, actionCode }) => {\n\t\t\t\tif (featureCode === 'store' && actionCode === 'sync') {\n\t\t\t\t\thitCount++\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\n\t\tawait emitter.emit('feature.will-execute', {\n\t\t\tfeatureCode: 'node',\n\t\t\tactionCode: 'upgrade',\n\t\t})\n\n\t\tassert.isEqual(hitCount, 0)\n\n\t\tawait emitter.emit('feature.did-execute', {\n\t\t\tfeatureCode: 'node',\n\t\t\tactionCode: 'upgrade',\n\t\t\tresults: {},\n\t\t})\n\n\t\tassert.isEqual(hitCount, 1)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;IAEqBA,gB,WACnB,IAAAC,eAAA,G;;;;;;;;;;;;;8GAAD;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEO,KAAKC,cAAL,GAAsBC,qBAAtB,CAA4C,QAA5C,CAFP;;cAAA;gBAICC,0BAAA,CAAeC,WAAf,CAA2B,MAA3B,EAAmC;kBAClCC,IAAI,EAAE;gBAD4B,CAAnC;;gBAIIC,QARL,GAQgB,CARhB;gBASOC,OATP,GASiB,KAAKC,UAAL,EATjB;gBAAA;gBAAA,OAUOD,OAAO,CAACE,EAAR,CACL,sBADK;kBAAA,0FAEL;oBAAA;oBAAA;sBAAA;wBAAA;0BAAA;4BAASC,WAAT,QAASA,WAAT,EAAsBC,UAAtB,QAAsBA,UAAtB;;4BACC,IAAID,WAAW,KAAK,OAAhB,IAA2BC,UAAU,KAAK,MAA9C,EAAsD;8BACrDL,QAAQ;4BACR;;0BAHF;0BAAA;4BAAA;wBAAA;sBAAA;oBAAA;kBAAA,CAFK;;kBAAA;oBAAA;kBAAA;gBAAA,IAVP;;cAAA;gBAAA;gBAAA,OAmBOC,OAAO,CAACK,IAAR,CAAa,sBAAb,EAAqC;kBAC1CF,WAAW,EAAE,MAD6B;kBAE1CC,UAAU,EAAE;gBAF8B,CAArC,CAnBP;;cAAA;gBAwBCE,iBAAA,CAAOC,OAAP,CAAeR,QAAf,EAAyB,CAAzB;;gBAxBD;gBAAA,OA0BOC,OAAO,CAACK,IAAR,CAAa,qBAAb,EAAoC;kBACzCF,WAAW,EAAE,MAD4B;kBAEzCC,UAAU,EAAE,SAF6B;kBAGzCI,OAAO,EAAE;gBAHgC,CAApC,CA1BP;;cAAA;gBAgCCF,iBAAA,CAAOC,OAAP,CAAeR,QAAf,EAAyB,CAAzB;;cAhCD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EAD6CU,4B"}
|
|
@@ -27,7 +27,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
27
27
|
|
|
28
28
|
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
31
31
|
|
|
32
32
|
var _TestReporter = _interopRequireDefault(require("../../features/test/TestReporter"));
|
|
33
33
|
|
|
@@ -39,7 +39,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
39
39
|
|
|
40
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
41
|
|
|
42
|
-
var TestReporterTest = (_dec = (0,
|
|
42
|
+
var TestReporterTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractCliTest) {
|
|
43
43
|
(0, _inherits2["default"])(TestReporterTest, _AbstractCliTest);
|
|
44
44
|
|
|
45
45
|
var _super = _createSuper(TestReporterTest);
|
|
@@ -85,7 +85,7 @@ var TestReporterTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _de
|
|
|
85
85
|
while (1) {
|
|
86
86
|
switch (_context2.prev = _context2.next) {
|
|
87
87
|
case 0:
|
|
88
|
-
|
|
88
|
+
_testUtils.assert.isTrue(this.reporter instanceof _TestReporter["default"]);
|
|
89
89
|
|
|
90
90
|
case 1:
|
|
91
91
|
case "end":
|
|
@@ -109,7 +109,7 @@ var TestReporterTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _de
|
|
|
109
109
|
while (1) {
|
|
110
110
|
switch (_context3.prev = _context3.next) {
|
|
111
111
|
case 0:
|
|
112
|
-
|
|
112
|
+
_testUtils.assert.isFunction(this.reporter.render);
|
|
113
113
|
|
|
114
114
|
case 1:
|
|
115
115
|
case "end":
|
|
@@ -135,7 +135,7 @@ var TestReporterTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _de
|
|
|
135
135
|
while (1) {
|
|
136
136
|
switch (_context4.prev = _context4.next) {
|
|
137
137
|
case 0:
|
|
138
|
-
|
|
138
|
+
_testUtils.assert.doesThrow(function () {
|
|
139
139
|
return _this.reporter.updateResults({
|
|
140
140
|
totalTestFiles: 0
|
|
141
141
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestReporter.test.js","names":["TestReporterTest","test","reporter","TestReporter","assert","isTrue","isFunction","render","doesThrow","updateResults","totalTestFiles","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/TestReporter.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport TestReporter from '../../features/test/TestReporter'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class TestReporterTest extends AbstractCliTest {\n\tprivate static reporter: TestReporter\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tthis.reporter = new TestReporter()\n\t}\n\n\t@test()\n\tprotected static async canCreateReporter() {\n\t\tassert.isTrue(this.reporter instanceof TestReporter)\n\t}\n\n\t@test()\n\tprotected static async hasRenderMethod() {\n\t\tassert.isFunction(this.reporter.render)\n\t}\n\n\t@test()\n\tprotected static async cantFeedInResultsIfNotStarted() {\n\t\tassert.doesThrow(\n\t\t\t() => this.reporter.updateResults({ totalTestFiles: 0 }),\n\t\t\t/call start/\n\t\t)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;IAEqBA,gB,WAQnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"TestReporter.test.js","names":["TestReporterTest","test","reporter","TestReporter","assert","isTrue","isFunction","render","doesThrow","updateResults","totalTestFiles","AbstractCliTest"],"sources":["../../../src/__tests__/implementation/TestReporter.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport TestReporter from '../../features/test/TestReporter'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class TestReporterTest extends AbstractCliTest {\n\tprivate static reporter: TestReporter\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tthis.reporter = new TestReporter()\n\t}\n\n\t@test()\n\tprotected static async canCreateReporter() {\n\t\tassert.isTrue(this.reporter instanceof TestReporter)\n\t}\n\n\t@test()\n\tprotected static async hasRenderMethod() {\n\t\tassert.isFunction(this.reporter.render)\n\t}\n\n\t@test()\n\tprotected static async cantFeedInResultsIfNotStarted() {\n\t\tassert.doesThrow(\n\t\t\t() => this.reporter.updateResults({ totalTestFiles: 0 }),\n\t\t\t/call start/\n\t\t)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;IAEqBA,gB,WAQnB,IAAAC,eAAA,G,UAKA,IAAAA,eAAA,G,UAKA,IAAAA,eAAA,G;;;;;;;;;;;;;sGAfD;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA;;cAAA;gBAEC,KAAKC,QAAL,GAAgB,IAAIC,wBAAJ,EAAhB;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;6GAKA;QAAA;UAAA;YAAA;cAAA;gBAECC,iBAAA,CAAOC,MAAP,CAAc,KAAKH,QAAL,YAAyBC,wBAAvC;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;2GAKA;QAAA;UAAA;YAAA;cAAA;gBAECC,iBAAA,CAAOE,UAAP,CAAkB,KAAKJ,QAAL,CAAcK,MAAhC;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;yHAKA;QAAA;;QAAA;UAAA;YAAA;cAAA;gBAECH,iBAAA,CAAOI,SAAP,CACC;kBAAA,OAAM,KAAI,CAACN,QAAL,CAAcO,aAAd,CAA4B;oBAAEC,cAAc,EAAE;kBAAlB,CAA5B,CAAN;gBAAA,CADD,EAEC,YAFD;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EAlB6CC,4B"}
|
|
@@ -29,8 +29,6 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
29
29
|
|
|
30
30
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
31
31
|
|
|
32
|
-
var _test = require("@sprucelabs/test");
|
|
33
|
-
|
|
34
32
|
var _testUtils = require("@sprucelabs/test-utils");
|
|
35
33
|
|
|
36
34
|
var _TestRunner = _interopRequireDefault(require("../../features/test/TestRunner"));
|
|
@@ -43,7 +41,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
43
41
|
|
|
44
42
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
43
|
|
|
46
|
-
var TestRunnerTest = (_dec = (0,
|
|
44
|
+
var TestRunnerTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), _dec4 = (0, _testUtils.test)(), _dec5 = (0, _testUtils.test)(), _dec6 = (0, _testUtils.test)(), _dec7 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractTestTest) {
|
|
47
45
|
(0, _inherits2["default"])(TestRunnerTest, _AbstractTestTest);
|
|
48
46
|
|
|
49
47
|
var _super = _createSuper(TestRunnerTest);
|
|
@@ -92,7 +90,7 @@ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
92
90
|
while (1) {
|
|
93
91
|
switch (_context2.prev = _context2.next) {
|
|
94
92
|
case 0:
|
|
95
|
-
|
|
93
|
+
_testUtils.assert.isTruthy(this.testRunner);
|
|
96
94
|
|
|
97
95
|
case 1:
|
|
98
96
|
case "end":
|
|
@@ -120,7 +118,7 @@ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
120
118
|
switch (_context3.prev = _context3.next) {
|
|
121
119
|
case 0:
|
|
122
120
|
_context3.next = 2;
|
|
123
|
-
return
|
|
121
|
+
return _testUtils.assert.doesThrowAsync(function () {
|
|
124
122
|
return _this.testRunner.run();
|
|
125
123
|
});
|
|
126
124
|
|
|
@@ -172,11 +170,11 @@ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
172
170
|
case 7:
|
|
173
171
|
results = _context4.sent;
|
|
174
172
|
|
|
175
|
-
|
|
173
|
+
_testUtils.assert.isEqual(results.totalTestFiles, 1);
|
|
176
174
|
|
|
177
|
-
|
|
175
|
+
_testUtils.assert.isEqual(results.totalFailed, 1);
|
|
178
176
|
|
|
179
|
-
|
|
177
|
+
_testUtils.assert.isEqual(results.totalTests, 2);
|
|
180
178
|
|
|
181
179
|
_context4.next = 13;
|
|
182
180
|
return this.createTest({
|
|
@@ -191,11 +189,11 @@ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
191
189
|
case 15:
|
|
192
190
|
results = _context4.sent;
|
|
193
191
|
|
|
194
|
-
|
|
192
|
+
_testUtils.assert.isEqual(results.totalTestFiles, 2);
|
|
195
193
|
|
|
196
|
-
|
|
194
|
+
_testUtils.assert.isEqual(results.totalFailed, 2);
|
|
197
195
|
|
|
198
|
-
|
|
196
|
+
_testUtils.assert.isEqual(results.totalTests, 4);
|
|
199
197
|
|
|
200
198
|
case 19:
|
|
201
199
|
case "end":
|
|
@@ -239,13 +237,13 @@ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
239
237
|
case 7:
|
|
240
238
|
testResults = _context5.sent;
|
|
241
239
|
|
|
242
|
-
|
|
240
|
+
_testUtils.assert.isEqual(testResults.totalTestFiles, 1);
|
|
243
241
|
|
|
244
|
-
|
|
242
|
+
_testUtils.assert.isEqual(testResults.totalFailed, 0);
|
|
245
243
|
|
|
246
|
-
|
|
244
|
+
_testUtils.assert.isEqual(testResults.totalPassed, 2);
|
|
247
245
|
|
|
248
|
-
|
|
246
|
+
_testUtils.assert.isEqual(testResults.totalTests, 2);
|
|
249
247
|
|
|
250
248
|
case 12:
|
|
251
249
|
case "end":
|
|
@@ -292,13 +290,13 @@ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
292
290
|
return this.testRunner.run();
|
|
293
291
|
|
|
294
292
|
case 9:
|
|
295
|
-
|
|
293
|
+
_testUtils.assert.isTruthy(results);
|
|
296
294
|
|
|
297
|
-
|
|
295
|
+
_testUtils.assert.isEqual(results.totalTestFiles, 1);
|
|
298
296
|
|
|
299
|
-
|
|
297
|
+
_testUtils.assert.isEqual(results.totalFailed, 1);
|
|
300
298
|
|
|
301
|
-
|
|
299
|
+
_testUtils.assert.isEqual(results.totalTests, 2);
|
|
302
300
|
|
|
303
301
|
case 13:
|
|
304
302
|
case "end":
|
|
@@ -351,13 +349,13 @@ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
351
349
|
case 9:
|
|
352
350
|
results = _context7.sent;
|
|
353
351
|
|
|
354
|
-
|
|
352
|
+
_testUtils.assert.isTruthy(results);
|
|
355
353
|
|
|
356
|
-
|
|
354
|
+
_testUtils.assert.isEqual(results.totalTestFiles, 1);
|
|
357
355
|
|
|
358
|
-
|
|
356
|
+
_testUtils.assert.isEqual(results.totalFailed, 1);
|
|
359
357
|
|
|
360
|
-
|
|
358
|
+
_testUtils.assert.isEqual(results.totalTests, 2);
|
|
361
359
|
|
|
362
360
|
case 14:
|
|
363
361
|
case "end":
|
|
@@ -412,7 +410,7 @@ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
412
410
|
case 11:
|
|
413
411
|
results = _context8.sent;
|
|
414
412
|
|
|
415
|
-
|
|
413
|
+
_testUtils.assert.isTrue(results.wasKilled);
|
|
416
414
|
|
|
417
415
|
case 13:
|
|
418
416
|
case "end":
|
|
@@ -462,7 +460,7 @@ var TestRunnerTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _dec3
|
|
|
462
460
|
if (shouldFix) {
|
|
463
461
|
file = (_results$files = results.files) === null || _results$files === void 0 ? void 0 : _results$files[0];
|
|
464
462
|
|
|
465
|
-
|
|
463
|
+
_testUtils.assert.isTruthy(file);
|
|
466
464
|
|
|
467
465
|
this.fixBadTest(file.path);
|
|
468
466
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRunner.test.js","names":["TestRunnerTest","test","testRunner","TestRunner","cwd","commandService","Service","assert","isTruthy","doesThrowAsync","run","err","errorAssert","assertError","dir","installTests","cli","createTest","name","results","isEqual","totalTestFiles","totalFailed","totalTests","shouldFix","testResults","totalPassed","on","payload","shouldBuild","pattern","promise","kill","isTrue","wasKilled","options","Action","execute","type","nameReadable","nameCamel","namesUtil","toCamel","namePascal","toPascal","waitForInput","ui","sendInput","file","files","fixBadTest","path","build","AbstractTestTest"],"sources":["../../../src/__tests__/implementation/TestRunner.test.ts"],"sourcesContent":["import { namesUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport { CliInterface } from '../../cli'\nimport { SpruceTestResults } from '../../features/test/test.types'\nimport TestRunner from '../../features/test/TestRunner'\nimport AbstractTestTest from '../../tests/AbstractTestTest'\n\nexport default class TestRunnerTest extends AbstractTestTest {\n\tprotected static testRunner: TestRunner\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tthis.testRunner = new TestRunner({\n\t\t\tcwd: this.cwd,\n\t\t\tcommandService: this.Service('command'),\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async canCreateTestRunner() {\n\t\tassert.isTruthy(this.testRunner)\n\t}\n\n\t@test()\n\tprotected static async runningOnDirWithNoTestsConfiguredThrows() {\n\t\tconst err = await assert.doesThrowAsync(() => this.testRunner.run())\n\t\terrorAssert.assertError(err, 'INVALID_TEST_DIRECTORY', {\n\t\t\tdir: this.cwd,\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async getsFailedResultsWhenTestFails() {\n\t\tconst cli = await this.installTests()\n\n\t\tawait this.createTest({ cli, name: 'Can book appointment' })\n\n\t\tlet results = await this.testRunner.run()\n\n\t\tassert.isEqual(results.totalTestFiles, 1)\n\t\tassert.isEqual(results.totalFailed, 1)\n\t\tassert.isEqual(results.totalTests, 2)\n\n\t\tawait this.createTest({ cli, name: 'Can cancel appointment' })\n\n\t\tresults = await this.testRunner.run()\n\n\t\tassert.isEqual(results.totalTestFiles, 2)\n\t\tassert.isEqual(results.totalFailed, 2)\n\t\tassert.isEqual(results.totalTests, 4)\n\t}\n\n\t@test()\n\tprotected static async passesOnGoodTests() {\n\t\tconst cli = await this.installTests()\n\n\t\tawait this.createTest({ cli, name: 'Can pass tests', shouldFix: true })\n\n\t\tconst testResults = await this.testRunner.run()\n\n\t\tassert.isEqual(testResults.totalTestFiles, 1)\n\t\tassert.isEqual(testResults.totalFailed, 0)\n\t\tassert.isEqual(testResults.totalPassed, 2)\n\t\tassert.isEqual(testResults.totalTests, 2)\n\t}\n\n\t@test()\n\tprotected static async emitsEventsOnTestUpdates() {\n\t\tconst cli = await this.installTests()\n\n\t\tlet results: SpruceTestResults | undefined\n\t\tawait this.testRunner.on('did-update', (payload) => {\n\t\t\tresults = payload.results\n\t\t})\n\n\t\tawait this.createTest({ cli, name: 'Emitting test' })\n\n\t\tawait this.testRunner.run()\n\n\t\tassert.isTruthy(results)\n\t\tassert.isEqual(results.totalTestFiles, 1)\n\t\tassert.isEqual(results.totalFailed, 1)\n\t\tassert.isEqual(results.totalTests, 2)\n\t}\n\n\t@test()\n\tprotected static async canHandlePattern() {\n\t\tconst cli = await this.installTests()\n\n\t\tawait this.createTest({\n\t\t\tcli,\n\t\t\tname: 'Can handlePatterns tests',\n\t\t\tshouldBuild: false,\n\t\t})\n\t\tawait this.createTest({ cli, name: 'Can handlePatterns2 tests' })\n\n\t\tconst results = await this.testRunner.run({\n\t\t\tpattern: 'canHandlePatternsTests',\n\t\t})\n\n\t\tassert.isTruthy(results)\n\t\tassert.isEqual(results.totalTestFiles, 1)\n\t\tassert.isEqual(results.totalFailed, 1)\n\t\tassert.isEqual(results.totalTests, 2)\n\t}\n\n\t@test()\n\tprotected static async testsCanBeKilled() {\n\t\tconst cli = await this.installTests()\n\n\t\tawait this.createTest({\n\t\t\tcli,\n\t\t\tname: 'Can handlePatterns tests',\n\t\t\tshouldBuild: false,\n\t\t})\n\t\tawait this.createTest({ cli, name: 'Can handlePatterns2 tests' })\n\n\t\tconst promise = this.testRunner.run({\n\t\t\tpattern: 'canHandlePatternsTests',\n\t\t})\n\n\t\tthis.testRunner.kill()\n\n\t\tconst results = await promise\n\n\t\tassert.isTrue(results.wasKilled)\n\t}\n\n\tprivate static async createTest(options: {\n\t\tcli: CliInterface\n\t\tname: string\n\t\tshouldFix?: boolean\n\t\tshouldBuild?: boolean\n\t}) {\n\t\tconst { name, shouldFix = false, shouldBuild = true } = options\n\n\t\tconst promise = this.Action('test', 'create').execute({\n\t\t\ttype: 'behavioral',\n\t\t\tnameReadable: name,\n\t\t\tnameCamel: namesUtil.toCamel(name),\n\t\t\tnamePascal: namesUtil.toPascal(name),\n\t\t})\n\n\t\tawait this.waitForInput()\n\t\tawait this.ui.sendInput('')\n\n\t\tconst results = await promise\n\n\t\tif (shouldFix) {\n\t\t\tconst file = results.files?.[0]\n\t\t\tassert.isTruthy(file)\n\t\t\tthis.fixBadTest(file.path)\n\t\t}\n\n\t\tif (shouldBuild) {\n\t\t\tawait this.Service('build').build()\n\t\t}\n\n\t\treturn results\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAGA;;AACA;;;;;;;;IAEqBA,c,WAWnB,IAAAC,UAAA,G,UAKA,IAAAA,UAAA,G,UAQA,IAAAA,UAAA,G,UAqBA,IAAAA,UAAA,G,UAcA,IAAAA,UAAA,G,UAmBA,IAAAA,UAAA,G,UAqBA,IAAAA,UAAA,G;;;;;;;;;;;;;sGAhGD;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA;;cAAA;gBAEC,KAAKC,UAAL,GAAkB,IAAIC,sBAAJ,CAAe;kBAChCC,GAAG,EAAE,KAAKA,GADsB;kBAEhCC,cAAc,EAAE,KAAKC,OAAL,CAAa,SAAb;gBAFgB,CAAf,CAAlB;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;+GAQA;QAAA;UAAA;YAAA;cAAA;g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CAAkB,EAAlB,CAhBP;;cAAA;gBAAA;gBAAA,OAkBuBhB,OAlBvB;;cAAA;gBAkBOZ,OAlBP;;gBAoBC,IAAIK,SAAJ,EAAe;kBACRwB,IADQ,qBACD7B,OAAO,CAAC8B,KADP,mDACD,eAAgB,CAAhB,CADC;;kBAEd1C,YAAA,CAAOC,QAAP,CAAgBwC,IAAhB;;kBACA,KAAKE,UAAL,CAAgBF,IAAI,CAACG,IAArB;gBACA;;gBAxBF,KA0BKtB,WA1BL;kBAAA;kBAAA;gBAAA;;gBAAA;gBAAA,OA2BQ,KAAKvB,OAAL,CAAa,OAAb,EAAsB8C,KAAtB,EA3BR;;cAAA;gBAAA,kCA8BQjC,OA9BR;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EAzH2CkC,6B"}
|
|
1
|
+
{"version":3,"file":"TestRunner.test.js","names":["TestRunnerTest","test","testRunner","TestRunner","cwd","commandService","Service","assert","isTruthy","doesThrowAsync","run","err","errorAssert","assertError","dir","installTests","cli","createTest","name","results","isEqual","totalTestFiles","totalFailed","totalTests","shouldFix","testResults","totalPassed","on","payload","shouldBuild","pattern","promise","kill","isTrue","wasKilled","options","Action","execute","type","nameReadable","nameCamel","namesUtil","toCamel","namePascal","toPascal","waitForInput","ui","sendInput","file","files","fixBadTest","path","build","AbstractTestTest"],"sources":["../../../src/__tests__/implementation/TestRunner.test.ts"],"sourcesContent":["import { namesUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport { CliInterface } from '../../cli'\nimport { SpruceTestResults } from '../../features/test/test.types'\nimport TestRunner from '../../features/test/TestRunner'\nimport AbstractTestTest from '../../tests/AbstractTestTest'\n\nexport default class TestRunnerTest extends AbstractTestTest {\n\tprotected static testRunner: TestRunner\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tthis.testRunner = new TestRunner({\n\t\t\tcwd: this.cwd,\n\t\t\tcommandService: this.Service('command'),\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async canCreateTestRunner() {\n\t\tassert.isTruthy(this.testRunner)\n\t}\n\n\t@test()\n\tprotected static async runningOnDirWithNoTestsConfiguredThrows() {\n\t\tconst err = await assert.doesThrowAsync(() => this.testRunner.run())\n\t\terrorAssert.assertError(err, 'INVALID_TEST_DIRECTORY', {\n\t\t\tdir: this.cwd,\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async getsFailedResultsWhenTestFails() {\n\t\tconst cli = await this.installTests()\n\n\t\tawait this.createTest({ cli, name: 'Can book appointment' })\n\n\t\tlet results = await this.testRunner.run()\n\n\t\tassert.isEqual(results.totalTestFiles, 1)\n\t\tassert.isEqual(results.totalFailed, 1)\n\t\tassert.isEqual(results.totalTests, 2)\n\n\t\tawait this.createTest({ cli, name: 'Can cancel appointment' })\n\n\t\tresults = await this.testRunner.run()\n\n\t\tassert.isEqual(results.totalTestFiles, 2)\n\t\tassert.isEqual(results.totalFailed, 2)\n\t\tassert.isEqual(results.totalTests, 4)\n\t}\n\n\t@test()\n\tprotected static async passesOnGoodTests() {\n\t\tconst cli = await this.installTests()\n\n\t\tawait this.createTest({ cli, name: 'Can pass tests', shouldFix: true })\n\n\t\tconst testResults = await this.testRunner.run()\n\n\t\tassert.isEqual(testResults.totalTestFiles, 1)\n\t\tassert.isEqual(testResults.totalFailed, 0)\n\t\tassert.isEqual(testResults.totalPassed, 2)\n\t\tassert.isEqual(testResults.totalTests, 2)\n\t}\n\n\t@test()\n\tprotected static async emitsEventsOnTestUpdates() {\n\t\tconst cli = await this.installTests()\n\n\t\tlet results: SpruceTestResults | undefined\n\t\tawait this.testRunner.on('did-update', (payload) => {\n\t\t\tresults = payload.results\n\t\t})\n\n\t\tawait this.createTest({ cli, name: 'Emitting test' })\n\n\t\tawait this.testRunner.run()\n\n\t\tassert.isTruthy(results)\n\t\tassert.isEqual(results.totalTestFiles, 1)\n\t\tassert.isEqual(results.totalFailed, 1)\n\t\tassert.isEqual(results.totalTests, 2)\n\t}\n\n\t@test()\n\tprotected static async canHandlePattern() {\n\t\tconst cli = await this.installTests()\n\n\t\tawait this.createTest({\n\t\t\tcli,\n\t\t\tname: 'Can handlePatterns tests',\n\t\t\tshouldBuild: false,\n\t\t})\n\t\tawait this.createTest({ cli, name: 'Can handlePatterns2 tests' })\n\n\t\tconst results = await this.testRunner.run({\n\t\t\tpattern: 'canHandlePatternsTests',\n\t\t})\n\n\t\tassert.isTruthy(results)\n\t\tassert.isEqual(results.totalTestFiles, 1)\n\t\tassert.isEqual(results.totalFailed, 1)\n\t\tassert.isEqual(results.totalTests, 2)\n\t}\n\n\t@test()\n\tprotected static async testsCanBeKilled() {\n\t\tconst cli = await this.installTests()\n\n\t\tawait this.createTest({\n\t\t\tcli,\n\t\t\tname: 'Can handlePatterns tests',\n\t\t\tshouldBuild: false,\n\t\t})\n\t\tawait this.createTest({ cli, name: 'Can handlePatterns2 tests' })\n\n\t\tconst promise = this.testRunner.run({\n\t\t\tpattern: 'canHandlePatternsTests',\n\t\t})\n\n\t\tthis.testRunner.kill()\n\n\t\tconst results = await promise\n\n\t\tassert.isTrue(results.wasKilled)\n\t}\n\n\tprivate static async createTest(options: {\n\t\tcli: CliInterface\n\t\tname: string\n\t\tshouldFix?: boolean\n\t\tshouldBuild?: boolean\n\t}) {\n\t\tconst { name, shouldFix = false, shouldBuild = true } = options\n\n\t\tconst promise = this.Action('test', 'create').execute({\n\t\t\ttype: 'behavioral',\n\t\t\tnameReadable: name,\n\t\t\tnameCamel: namesUtil.toCamel(name),\n\t\t\tnamePascal: namesUtil.toPascal(name),\n\t\t})\n\n\t\tawait this.waitForInput()\n\t\tawait this.ui.sendInput('')\n\n\t\tconst results = await promise\n\n\t\tif (shouldFix) {\n\t\t\tconst file = results.files?.[0]\n\t\t\tassert.isTruthy(file)\n\t\t\tthis.fixBadTest(file.path)\n\t\t}\n\n\t\tif (shouldBuild) {\n\t\t\tawait this.Service('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var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
31
31
|
|
|
32
32
|
var _AbstractSchemaTest2 = _interopRequireDefault(require("../../tests/AbstractSchemaTest"));
|
|
33
33
|
|
|
@@ -37,7 +37,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
37
37
|
|
|
38
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
39
|
|
|
40
|
-
var ValueTypeMappingTest = (_dec =
|
|
40
|
+
var ValueTypeMappingTest = (_dec = _testUtils.test.skip('enable when enable introduction of new schema fields'), (_class = /*#__PURE__*/function (_AbstractSchemaTest) {
|
|
41
41
|
(0, _inherits2["default"])(ValueTypeMappingTest, _AbstractSchemaTest);
|
|
42
42
|
|
|
43
43
|
var _super = _createSuper(ValueTypeMappingTest);
|
|
@@ -92,9 +92,9 @@ var ValueTypeMappingTest = (_dec = _test.test.skip('enable when enable introduct
|
|
|
92
92
|
fieldTypesFile = this.resolveHashSprucePath('schemas', 'fields', 'fields.types.ts');
|
|
93
93
|
typeContents = _spruceSkillUtils.diskUtil.readFile(fieldTypesFile);
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
_testUtils.assert.doesInclude(typeContents, 'SchemaFieldValueTypeMapper<F extends SchemaFieldFieldDefinition? F : SchemaFieldFieldDefinition, CreateEntityInstances>');
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
_testUtils.assert.doesInclude(typeContents, 'SelectFieldValueTypeMapper<F extends SelectFieldDefinition ? F: SelectFieldDefinition>');
|
|
98
98
|
|
|
99
99
|
_context2.next = 8;
|
|
100
100
|
return this.Service('typeChecker').check(fieldTypesFile);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValueTypeMapping.test.js","names":["ValueTypeMappingTest","test","skip","installSchemaFeature","Action","execute","fieldTypesFile","resolveHashSprucePath","typeContents","diskUtil","readFile","assert","doesInclude","Service","check","AbstractSchemaTest"],"sources":["../../../src/__tests__/implementation/ValueTypeMapping.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport AbstractSchemaTest from '../../tests/AbstractSchemaTest'\n\nexport default class ValueTypeMappingTest extends AbstractSchemaTest {\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tawait this.installSchemaFeature('schemas')\n\t}\n\n\t@test.skip('enable when enable introduction of new schema fields')\n\tprotected static async dropsMappersIntoFieldTypes() {\n\t\tawait this.Action('schema', 'sync').execute({})\n\n\t\tconst fieldTypesFile = this.resolveHashSprucePath(\n\t\t\t'schemas',\n\t\t\t'fields',\n\t\t\t'fields.types.ts'\n\t\t)\n\t\tconst typeContents = diskUtil.readFile(fieldTypesFile)\n\t\tassert.doesInclude(\n\t\t\ttypeContents,\n\t\t\t'SchemaFieldValueTypeMapper<F extends SchemaFieldFieldDefinition? F : SchemaFieldFieldDefinition, CreateEntityInstances>'\n\t\t)\n\t\tassert.doesInclude(\n\t\t\ttypeContents,\n\t\t\t'SelectFieldValueTypeMapper<F extends SelectFieldDefinition ? F: SelectFieldDefinition>'\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(fieldTypesFile)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;IAEqBA,oB,WAMnBC,
|
|
1
|
+
{"version":3,"file":"ValueTypeMapping.test.js","names":["ValueTypeMappingTest","test","skip","installSchemaFeature","Action","execute","fieldTypesFile","resolveHashSprucePath","typeContents","diskUtil","readFile","assert","doesInclude","Service","check","AbstractSchemaTest"],"sources":["../../../src/__tests__/implementation/ValueTypeMapping.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport AbstractSchemaTest from '../../tests/AbstractSchemaTest'\n\nexport default class ValueTypeMappingTest extends AbstractSchemaTest {\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tawait this.installSchemaFeature('schemas')\n\t}\n\n\t@test.skip('enable when enable introduction of new schema fields')\n\tprotected static async dropsMappersIntoFieldTypes() {\n\t\tawait this.Action('schema', 'sync').execute({})\n\n\t\tconst fieldTypesFile = this.resolveHashSprucePath(\n\t\t\t'schemas',\n\t\t\t'fields',\n\t\t\t'fields.types.ts'\n\t\t)\n\t\tconst typeContents = diskUtil.readFile(fieldTypesFile)\n\t\tassert.doesInclude(\n\t\t\ttypeContents,\n\t\t\t'SchemaFieldValueTypeMapper<F extends SchemaFieldFieldDefinition? F : SchemaFieldFieldDefinition, CreateEntityInstances>'\n\t\t)\n\t\tassert.doesInclude(\n\t\t\ttypeContents,\n\t\t\t'SelectFieldValueTypeMapper<F extends SelectFieldDefinition ? F: SelectFieldDefinition>'\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(fieldTypesFile)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;IAEqBA,oB,WAMnBC,eAAA,CAAKC,IAAL,CAAU,sDAAV,C;;;;;;;;;;;;;sGALD;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA;;cAAA;gBAAA;gBAAA,OAEO,KAAKC,oBAAL,CAA0B,SAA1B,CAFP;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;sHAKA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEO,KAAKC,MAAL,CAAY,QAAZ,EAAsB,MAAtB,EAA8BC,OAA9B,CAAsC,EAAtC,CAFP;;cAAA;gBAIOC,cAJP,GAIwB,KAAKC,qBAAL,CACtB,SADsB,EAEtB,QAFsB,EAGtB,iBAHsB,CAJxB;gBASOC,YATP,GASsBC,0BAAA,CAASC,QAAT,CAAkBJ,cAAlB,CATtB;;gBAUCK,iBAAA,CAAOC,WAAP,CACCJ,YADD,EAEC,yHAFD;;gBAIAG,iBAAA,CAAOC,WAAP,CACCJ,YADD,EAEC,wFAFD;;gBAdD;gBAAA,OAmBO,KAAKK,OAAL,CAAa,aAAb,EAA4BC,KAA5B,CAAkCR,cAAlC,CAnBP;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EANiDS,+B"}
|