When testing LWC components we can use Jest Framework to mock wire adapters. In order to do that we add .json files under the ‘__test__’ folder. When I open one of the .json files then the content is not shown.
The .json file should also not be deployed to Salesforce
According to the documentation
In the __tests__ folder, create a data folder, and a JSON file called wireAdapter.json. It’s a best practice to name the file after the wire adapter. Mock the data the component expects from Salesforce.
Steps to repoduce
- create a web component e.g. helloWorld
- add the ‘__test__’ folder
- add a new json file e.g. ‘helloAdapter.json’
- open file ‘helloAdapter.json’
Content of Json file is not shown