Skip to content

Wiki: Debug Tests #438

Closed
Closed

Description

@noel-schenk

So I had to debug tests and it took me a long time to figure this out maybe we can open the wiki tab to keep knowledge at one place.

Inside the package.json under scripts edit test:integration and test:unit

"test:integration": "node --inspect -r ts-node/register node_modules/tape/bin/tape 'test/tests/integration/test.ts' | tap-bail | tap-spec",
"test:unit": "node --inspect -r ts-node/register node_modules/tape/bin/tape 'test/tests/unit/**/test.ts' | tap-bail | tap-spec",

Inside launch.json

{
    // 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": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch via NPM",
            "runtimeExecutable": "npm",
            "runtimeArgs": [
                "run-script",
                "test"
            ],
            "port": 9229,
            "cwd":"${workspaceFolder}/twing" //maybe you have to edit this to a different folder
        }
        
    ]
}

Activity

  1. locked and limited conversation to collaborators on Nov 27, 2023
  2. converted this issue into a discussion #549 on Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions