Azure / Azure/react-azure-maps

Regarding writing test cases for react-azure-maps implementation in react app

Open
#102 10 comments 2 reactions 0 assignees View on GitHub
bug question
Dominant language
TypeScript
Stars
58
Forks
43
PR merge metrics
No merged PRs in 30d

Description

Hi,

I did a very simple implementation for react-azure-maps as below :

```
import * as azureMap from "react-azure-maps";
import {
ControlOptions,
AuthenticationType as auth
} from "azure-maps-control";

import "./App.css";

const cameraOptions: azureMap.AzureSetCameraOptions = {
center: [-1.9591947375679695, 52.46891727965905],
maxBounds: [-6.0, 49.959999905, 1.68153079591, 58.6350001085],
};

const controls: azureMap.IAzureMapControls[] = [
{
controlName: "StyleControl",
controlOptions: {
mapStyles: ["road", "grayscale_light", "satellite_road_labels"],
},
options: {
position:"bottom-left",
} as ControlOptions,
},
{
controlName: "ZoomControl",
options: { position: "bottom-right" } as ControlOptions,
},
];

const mapConfigState: azureMap.IAzureMapOptions = {
authOptions: {
authType: auth.subscriptionKey,
subscriptionKey: "********************************",
clientId: ""********************************",
},
};

function App() {
return (








);
}

export default App;

```

I tried to write the test case for the implementation using Jest. It gives me this error :

![image](https://user-images.githubusercontent.com/10142586/138909769-6e42e825-c968-43fd-a772-54947aae7225.png)

Please help !

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.