diff --git a/README.md b/README.md index 0799ad78e1d4014da493d0fda6599dc0c9ec2148..716c060623c1823fe3bb4e863666975c381d10fa 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,20 @@ $ npm run lint ``` ## Debugging -Useful browser extensions for debugging/development purposes + +### Local instance + +The following browser extensions are useful for debugging a local development instance of Mirador: + - [React DevTools](https://github.com/facebook/react-devtools) - [Redux DevTools](https://github.com/zalmoxisus/redux-devtools-extension) + +### Test suite + +To debug the test suite, run: + +```sh +$ npm run test:debug +``` + +then spin up a [nodejs inspector client](https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients) and set some breakpoints. See [here](https://www.digitalocean.com/community/tutorials/how-to-debug-node-js-with-the-built-in-debugger-and-chrome-devtools#step-3-%E2%80%94-debugging-node-js-with-chrome-devtools) for a guide to debugging with Chrome DevTools. diff --git a/package.json b/package.json index 1b00a9c50a7eb2b7f6d8457d9699f7b9660832d9..e1527a7e22abd9722be9863f589fe5952a0d96de 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "lint:translations": "node ./scripts/i18n-lint.js", "server": "node_modules/.bin/http-server --cors", "test": "npm run build && npm run lint && npm run size && jest -c jest.json", + "test:debug": "node --inspect node_modules/.bin/jest -c jest.json --runInBand", "test:watch": "jest -c jest.json --watch", "build": "NODE_ENV=production webpack --mode=production", "build:dev": "webpack --mode=development",