Sherry2001 / lobster-ice

STEP 2020 Capstone Project :)
0 stars 1 forks source link

VS Code One Click Testing #11

Open Anthony-Fiddes opened 4 years ago

Anthony-Fiddes commented 4 years ago

I remember Sherry and I were discussing this offline. Here is a launch.json file that can go into your .vscode directory to accomplish mocha testing with one click.

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "args": [
                "-u",
                "bdd",
                "--timeout",
                "999999",
                "--colors",
                "${workspaceFolder}/server/test"
            ],
            "internalConsoleOptions": "openOnSessionStart",
            "name": "Mocha Tests",
            "program": "${workspaceFolder}/server/node_modules/mocha/bin/_mocha",
            "request": "launch",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "type": "pwa-node"
        },
    ]
}
Anthony-Fiddes commented 4 years ago
{
  "command": "npm start",
  "cwd": "${workspaceFolder}/webapp-client",
  "name": "Run react server",
  "request": "launch",
  "type": "node-terminal"
}

This config is used to launch commands like npm start. I guess I could've used this for npm test?