@mapcairn/core/contracts
The @mapcairn/core/contracts entry point of @mapcairn/core.
Checked against version 0.2.0. Import from @mapcairn/core/contracts.
Functions
runClipboardContract: Runs the shared behavioural suite for a ClipboardPort.runDevicePreferencesContract: Runs the shared behavioural suite for DevicePreferences.runFeatureQueryContract: Runs the shared behavioural suite for a FeatureQuery.runFeatureSelectionContract: Runs the shared behavioural suite for a FeatureSelection.runFileOpenerContract: Runs the shared behavioural suite for a FileOpener.runFileSaverContract: Runs the shared behavioural suite for a FileSaver.runLayerCatalogueContract: Runs the shared behavioural suite for a LayerCatalogue.runLayerSourceContract: Runs the shared behavioural suite for a LayerSource.runLocationProviderContract: Runs the shared behavioural suite for a LocationProvider.runMapAdapterContract: Runs the shared behavioural suite for a MapAdapter.runMessageCatalogueContract: Runs the shared behavioural suite for a MessageCatalogue.runRoutingProviderContract: Runs the shared behavioural suite for a RoutingProvider.runSearchProviderContract: Runs the shared behavioural suite for a SearchProvider.runSettingsStoreContract: Runs the shared behavioural suite for a SettingsStore.runSuggestionProviderContract: Runs the shared behavioural suite for a SuggestionProvider.runThemeSourceContract: Runs the shared behavioural suite for a ThemeSource.runUrlStateContract: Runs the shared behavioural suite for a UrlState.
Constants
CONTRACT_AREA: The area every query in the contract asks about: a box around Cape Town.CONTRACT_IDENTIFY_LAYER: A raster tile layer whose identify block asks its own origin, with the geojson decoder and an id and a title field.CONTRACT_LAYER: The feed layer every layer source is checked with: the geojson decoder, an id and a title field, and an on-demand detail on its own origin.CONTRACT_OTHER_IDENTIFY_LAYER: A second identifiable layer on a different URL, so the contract can hold one layer's answer while another layer is answered.CONTRACT_SELECTION_LIMIT: The limit the contract asks FeatureSelectionSubject factories for.DATA_SERVICE_NAMES: The Services entries that are plain data a host supplies, not ports: they have one shape and no second implementation, so they have no fake and no contract…HOST_SUPPLIED_PORT_NAMES: The optional ports that createServices() leaves out, because the data they hold belongs to the host that supplies them and an inert one would be dead code in…OPTIONAL_PORT_NAMES: The ports a host may leave out.PORT_NAMES: Every key of Services, kept by hand.PORT_REGISTRY: Maps every port to its fake and its contract suite.
Types
ClipboardContractFailure: The reasons a copy can fail, as the port defines them.ClipboardControls: How the clipboard contract scripts a port.ClipboardSubject: One clipboard port under test, with its controls.ContractPoint: A point the contract asks a source to return.DevicePreferencesControls: How the contract scripts the preferences.DevicePreferencesSubject: One preferences implementation under test, with its controls.FeatureQueryControls: How the feature query contract scripts a query.FeatureQuerySubject: One feature query under test, with its controls.FeatureSelectionControls: What the feature selection contract needs besides the store itself.FeatureSelectionSubject: One feature selection under test, with its controls.FeatureSelectionSubjectOptions: Options the contract passes to the factory it is given.FileOpenerControls: How the file opener contract plays the person and the browser.FileOpenerSubject: One file opener under test, with its controls.FileSaverContractFailure: The reasons a save can fail, as the port defines them.FileSaverControls: How the file saver contract scripts a port.FileSaverSubject: One file saver under test, with its controls.LayerCatalogueControls: What the layer catalogue contract needs besides the catalogue itself.LayerCatalogueSubject: One layer catalogue under test, with its controls.LayerSourceControls: What the layer source contract needs besides the source itself.LayerSourceSubject: One layer source under test, with its controls.LocationProviderControls: How the location contract scripts a provider.LocationProviderSubject: One location provider under test, with its controls.MapAdapterControls: What the map contract needs besides the adapter itself.MapAdapterSubject: One map adapter under test, with its controls.MessageCatalogueFixture: How the message catalogue contract scripts a subject.PortContractRunners: The contract runner for each port, with its exact subject type.PortEntry: What the registry holds for one port.PortName: The name of one port, as it appears on Services.PortRegistry: One PortEntry for every port.RoutingProviderControls: How the routing contract scripts a provider.RoutingProviderSubject: One routing provider under test, with its controls.ScriptedFeatureQueryFailure: The failures a query can be scripted to report.ScriptedRoutingFailure: The failures a provider can be scripted to report.SearchProviderControls: How the search contract scripts a provider.SearchProviderSubject: One search provider under test, with its controls.SettingsStoreControls: What the settings contract needs besides the store itself.SettingsStoreSubject: One settings store under test, with its controls.SuggestionProviderControls: How the suggestion contract scripts a provider.SuggestionProviderSubject: One suggestion provider under test, with its controls.ThemeSourceControls: How the theme contract scripts a source.ThemeSourceSubject: One theme source under test, with its controls.UrlStateControls: What the url contract needs besides the port itself.UrlStateSubject: One url state under test, with its controls.