- Docker installed and running
- VS Code Installed
- VS Code Extension
ms-vscode-remote.remote-containers
- Run Docker Locally
- Type
docker-compose up --build
in the root of the application directory - Wait for containers to come online
- Open this source code in VS Code
- In the bottom left corner click the >< green icon
- Select
Reopen in Container
- Wait for extensions to install
- Once container is running, in the integrated terminal run
yarn test
This will cause MMS to stall when executing await MongoMemoryServer.create();
on M1 Macs running Docker in Platform linux/arm64
If you recieve the following error while trying to run Jest:
node:internal/modules/cjs/loader:998
throw err;
^
Error: Cannot find module '/root/.vscode-server/data/User/workspaceStorage/a8cf8bbcc02a26cc5cd90655c8ae2c00/ms-vscode.js-debug/bootloader.js'
Require stack:
- internal/preload
at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Module._load (node:internal/modules/cjs/loader:841:27)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at Module._preloadModules (node:internal/modules/cjs/loader:1336:12)
at loadPreloadModules (node:internal/process/pre_execution:597:5)
at prepareMainThreadExecution (node:internal/process/pre_execution:104:3)
at node:internal/main/run_main_module:10:1 {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'internal/preload' ]
}
Do the following:
- Click on Code
- Open Preferences > Settings
- Search for
Auto Attach Filter
- Click the dropdown and select Disable then reselect the option it was previously on
- Retry test