小编Jit*_*wal的帖子

Jasmine 测试资源管理器正在 VS Code 中显示 typescript jasmine 测试

在此输入图像描述我正在使用 Jasmine Test explorer 进行角度打字稿。当我们创建角度组件时,*spec.ts 也会创建,因此 spec.ts 文件分散在整个项目中。我的spec_dir值正确吗?也让我知道,我缺少什么?

下面是 Jasmine.json

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


Run Code Online (Sandbox Code Playgroud)

下面是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"
}

Run Code Online (Sandbox Code Playgroud)

explorer jasmine typescript visual-studio-code angular

5
推荐指数
1
解决办法
925
查看次数