For orta.vscode-jest extension, I added the configuration below in settings.json. You can open settings.json by doing Command + Shift + P (Ctrl + Shift + P on Windows), typing settings JSON and selecting Preferences: Open User Settings (JSON).
"jest.autoRun": {
"onStartup": []
}
Or you can simply add:
"jest.autoRun": {}
If you want to run all tests on startup, add all-tests to the onStartup array:
"jest.autoRun": {
"onStartup": ["all-tests"]
}