aws / graph-explorer

React-based web application that enables users to visualize both property graph and RDF data and explore connections between data without having to write graph queries.
https://github.com/aws/graph-explorer
Apache License 2.0
300 stars 46 forks source link

Automatic setup of some common mocks #418

Closed kmcginnes closed 1 month ago

kmcginnes commented 1 month ago

Description

I kept getting errors about the import.meta.env.DEV calls in our code. The common fix was to mock the code using that data. But a better approach is to mock the data itself.

Since this is needed globally, I've configured a global setup test file for mocks used everywhere. We can always opt out or override any of these mocked types if needed for specific tests.

I've also added the localforage mock since we always want that mocked when we are testing React state logic.

Validation

Related Issues

Check List