# @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`](https://docs.mapcairn.com/api/core/contracts/runClipboardContract.md): Runs the shared behavioural suite for a ClipboardPort.
- [`runDevicePreferencesContract`](https://docs.mapcairn.com/api/core/contracts/runDevicePreferencesContract.md): Runs the shared behavioural suite for DevicePreferences.
- [`runFeatureQueryContract`](https://docs.mapcairn.com/api/core/contracts/runFeatureQueryContract.md): Runs the shared behavioural suite for a FeatureQuery.
- [`runFeatureSelectionContract`](https://docs.mapcairn.com/api/core/contracts/runFeatureSelectionContract.md): Runs the shared behavioural suite for a FeatureSelection.
- [`runFileOpenerContract`](https://docs.mapcairn.com/api/core/contracts/runFileOpenerContract.md): Runs the shared behavioural suite for a FileOpener.
- [`runFileSaverContract`](https://docs.mapcairn.com/api/core/contracts/runFileSaverContract.md): Runs the shared behavioural suite for a FileSaver.
- [`runLayerCatalogueContract`](https://docs.mapcairn.com/api/core/contracts/runLayerCatalogueContract.md): Runs the shared behavioural suite for a LayerCatalogue.
- [`runLayerSourceContract`](https://docs.mapcairn.com/api/core/contracts/runLayerSourceContract.md): Runs the shared behavioural suite for a LayerSource.
- [`runLocationProviderContract`](https://docs.mapcairn.com/api/core/contracts/runLocationProviderContract.md): Runs the shared behavioural suite for a LocationProvider.
- [`runMapAdapterContract`](https://docs.mapcairn.com/api/core/contracts/runMapAdapterContract.md): Runs the shared behavioural suite for a MapAdapter.
- [`runMessageCatalogueContract`](https://docs.mapcairn.com/api/core/contracts/runMessageCatalogueContract.md): Runs the shared behavioural suite for a MessageCatalogue.
- [`runRoutingProviderContract`](https://docs.mapcairn.com/api/core/contracts/runRoutingProviderContract.md): Runs the shared behavioural suite for a RoutingProvider.
- [`runSearchProviderContract`](https://docs.mapcairn.com/api/core/contracts/runSearchProviderContract.md): Runs the shared behavioural suite for a SearchProvider.
- [`runSettingsStoreContract`](https://docs.mapcairn.com/api/core/contracts/runSettingsStoreContract.md): Runs the shared behavioural suite for a SettingsStore.
- [`runSuggestionProviderContract`](https://docs.mapcairn.com/api/core/contracts/runSuggestionProviderContract.md): Runs the shared behavioural suite for a SuggestionProvider.
- [`runThemeSourceContract`](https://docs.mapcairn.com/api/core/contracts/runThemeSourceContract.md): Runs the shared behavioural suite for a ThemeSource.
- [`runUrlStateContract`](https://docs.mapcairn.com/api/core/contracts/runUrlStateContract.md): Runs the shared behavioural suite for a UrlState.

## Constants

- [`CONTRACT_AREA`](https://docs.mapcairn.com/api/core/contracts/CONTRACT_AREA.md): The area every query in the contract asks about: a box around Cape Town.
- [`CONTRACT_IDENTIFY_LAYER`](https://docs.mapcairn.com/api/core/contracts/CONTRACT_IDENTIFY_LAYER.md): A raster tile layer whose identify block asks its own origin, with the geojson decoder and an id and a title field.
- [`CONTRACT_LAYER`](https://docs.mapcairn.com/api/core/contracts/CONTRACT_LAYER.md): 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`](https://docs.mapcairn.com/api/core/contracts/CONTRACT_OTHER_IDENTIFY_LAYER.md): 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`](https://docs.mapcairn.com/api/core/contracts/CONTRACT_SELECTION_LIMIT.md): The limit the contract asks FeatureSelectionSubject factories for.
- [`DATA_SERVICE_NAMES`](https://docs.mapcairn.com/api/core/contracts/DATA_SERVICE_NAMES.md): 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`](https://docs.mapcairn.com/api/core/contracts/HOST_SUPPLIED_PORT_NAMES.md): 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`](https://docs.mapcairn.com/api/core/contracts/OPTIONAL_PORT_NAMES.md): The ports a host may leave out.
- [`PORT_NAMES`](https://docs.mapcairn.com/api/core/contracts/PORT_NAMES.md): Every key of Services, kept by hand.
- [`PORT_REGISTRY`](https://docs.mapcairn.com/api/core/contracts/PORT_REGISTRY.md): Maps every port to its fake and its contract suite.

## Types

- [`ClipboardContractFailure`](https://docs.mapcairn.com/api/core/contracts/ClipboardContractFailure.md): The reasons a copy can fail, as the port defines them.
- [`ClipboardControls`](https://docs.mapcairn.com/api/core/contracts/ClipboardControls.md): How the clipboard contract scripts a port.
- [`ClipboardSubject`](https://docs.mapcairn.com/api/core/contracts/ClipboardSubject.md): One clipboard port under test, with its controls.
- [`ContractPoint`](https://docs.mapcairn.com/api/core/contracts/ContractPoint.md): A point the contract asks a source to return.
- [`DevicePreferencesControls`](https://docs.mapcairn.com/api/core/contracts/DevicePreferencesControls.md): How the contract scripts the preferences.
- [`DevicePreferencesSubject`](https://docs.mapcairn.com/api/core/contracts/DevicePreferencesSubject.md): One preferences implementation under test, with its controls.
- [`FeatureQueryControls`](https://docs.mapcairn.com/api/core/contracts/FeatureQueryControls.md): How the feature query contract scripts a query.
- [`FeatureQuerySubject`](https://docs.mapcairn.com/api/core/contracts/FeatureQuerySubject.md): One feature query under test, with its controls.
- [`FeatureSelectionControls`](https://docs.mapcairn.com/api/core/contracts/FeatureSelectionControls.md): What the feature selection contract needs besides the store itself.
- [`FeatureSelectionSubject`](https://docs.mapcairn.com/api/core/contracts/FeatureSelectionSubject.md): One feature selection under test, with its controls.
- [`FeatureSelectionSubjectOptions`](https://docs.mapcairn.com/api/core/contracts/FeatureSelectionSubjectOptions.md): Options the contract passes to the factory it is given.
- [`FileOpenerControls`](https://docs.mapcairn.com/api/core/contracts/FileOpenerControls.md): How the file opener contract plays the person and the browser.
- [`FileOpenerSubject`](https://docs.mapcairn.com/api/core/contracts/FileOpenerSubject.md): One file opener under test, with its controls.
- [`FileSaverContractFailure`](https://docs.mapcairn.com/api/core/contracts/FileSaverContractFailure.md): The reasons a save can fail, as the port defines them.
- [`FileSaverControls`](https://docs.mapcairn.com/api/core/contracts/FileSaverControls.md): How the file saver contract scripts a port.
- [`FileSaverSubject`](https://docs.mapcairn.com/api/core/contracts/FileSaverSubject.md): One file saver under test, with its controls.
- [`LayerCatalogueControls`](https://docs.mapcairn.com/api/core/contracts/LayerCatalogueControls.md): What the layer catalogue contract needs besides the catalogue itself.
- [`LayerCatalogueSubject`](https://docs.mapcairn.com/api/core/contracts/LayerCatalogueSubject.md): One layer catalogue under test, with its controls.
- [`LayerSourceControls`](https://docs.mapcairn.com/api/core/contracts/LayerSourceControls.md): What the layer source contract needs besides the source itself.
- [`LayerSourceSubject`](https://docs.mapcairn.com/api/core/contracts/LayerSourceSubject.md): One layer source under test, with its controls.
- [`LocationProviderControls`](https://docs.mapcairn.com/api/core/contracts/LocationProviderControls.md): How the location contract scripts a provider.
- [`LocationProviderSubject`](https://docs.mapcairn.com/api/core/contracts/LocationProviderSubject.md): One location provider under test, with its controls.
- [`MapAdapterControls`](https://docs.mapcairn.com/api/core/contracts/MapAdapterControls.md): What the map contract needs besides the adapter itself.
- [`MapAdapterSubject`](https://docs.mapcairn.com/api/core/contracts/MapAdapterSubject.md): One map adapter under test, with its controls.
- [`MessageCatalogueFixture`](https://docs.mapcairn.com/api/core/contracts/MessageCatalogueFixture.md): How the message catalogue contract scripts a subject.
- [`PortContractRunners`](https://docs.mapcairn.com/api/core/contracts/PortContractRunners.md): The contract runner for each port, with its exact subject type.
- [`PortEntry`](https://docs.mapcairn.com/api/core/contracts/PortEntry.md): What the registry holds for one port.
- [`PortName`](https://docs.mapcairn.com/api/core/contracts/PortName.md): The name of one port, as it appears on Services.
- [`PortRegistry`](https://docs.mapcairn.com/api/core/contracts/PortRegistry.md): One PortEntry for every port.
- [`RoutingProviderControls`](https://docs.mapcairn.com/api/core/contracts/RoutingProviderControls.md): How the routing contract scripts a provider.
- [`RoutingProviderSubject`](https://docs.mapcairn.com/api/core/contracts/RoutingProviderSubject.md): One routing provider under test, with its controls.
- [`ScriptedFeatureQueryFailure`](https://docs.mapcairn.com/api/core/contracts/ScriptedFeatureQueryFailure.md): The failures a query can be scripted to report.
- [`ScriptedRoutingFailure`](https://docs.mapcairn.com/api/core/contracts/ScriptedRoutingFailure.md): The failures a provider can be scripted to report.
- [`SearchProviderControls`](https://docs.mapcairn.com/api/core/contracts/SearchProviderControls.md): How the search contract scripts a provider.
- [`SearchProviderSubject`](https://docs.mapcairn.com/api/core/contracts/SearchProviderSubject.md): One search provider under test, with its controls.
- [`SettingsStoreControls`](https://docs.mapcairn.com/api/core/contracts/SettingsStoreControls.md): What the settings contract needs besides the store itself.
- [`SettingsStoreSubject`](https://docs.mapcairn.com/api/core/contracts/SettingsStoreSubject.md): One settings store under test, with its controls.
- [`SuggestionProviderControls`](https://docs.mapcairn.com/api/core/contracts/SuggestionProviderControls.md): How the suggestion contract scripts a provider.
- [`SuggestionProviderSubject`](https://docs.mapcairn.com/api/core/contracts/SuggestionProviderSubject.md): One suggestion provider under test, with its controls.
- [`ThemeSourceControls`](https://docs.mapcairn.com/api/core/contracts/ThemeSourceControls.md): How the theme contract scripts a source.
- [`ThemeSourceSubject`](https://docs.mapcairn.com/api/core/contracts/ThemeSourceSubject.md): One theme source under test, with its controls.
- [`UrlStateControls`](https://docs.mapcairn.com/api/core/contracts/UrlStateControls.md): What the url contract needs besides the port itself.
- [`UrlStateSubject`](https://docs.mapcairn.com/api/core/contracts/UrlStateSubject.md): One url state under test, with its controls.
