Jasmine Test Explorer is showing typescript jasmine tests in VS Code
Asked Answered
G

1

6

enter image description hereI am using Jasmine Test explorer for angular typescript. When we create a angular component, the *spec.ts also created, so the spec.ts files are scattered all over the project. is my spec_dir value correct? Also let me know , what i am missing ?

Below is Jasmine.json

    {
    "spec_dir": "${workspaceFolder}/angularProject/src/app",
    "spec_files": [
        "**/*[sS]pec.ts"
    ],
    "helpers": [
        "helpers/**/*.ts"
    ],
    "stopSpecOnExpectationFailure": false,
    "random": true
}


Below is settings.json



{
    "typescript.updateImportsOnFileMove.enabled": "always",
    "gitlens.views.repositories.branches.layout": "list",
    "editor.formatOnSave": true,
    "editor.formatOnPaste": true,
    "jasmineExplorer.cwd": "test",
    "jasmineExplorer.logfile": "jasminexplorer.log",
    "jasmineExplorer.logpanel": true,
    "jasmineExplorer.config": "${workspaceFolder}/angularProject/spec/support/jasmine.json"
}

Golter answered 8/1, 2020 at 18:19 Comment(2)
did you found a way?Bourgogne
I'm having the same issue.Spine
S
1

You should add jasmineExplorer.nodeArgv configuration property with ["-r", "ts-node/register"] value to your settings.json (see TypeScript support section).

Slut answered 22/11, 2021 at 10:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.