wallabyjs / public

Repository for Wallaby.js questions and issues
http://wallabyjs.com
758 stars 45 forks source link

Cannot open Coverage and Test Explorer #2450

Closed colombod closed 4 years ago

colombod commented 4 years ago

Issue description or question

PLEASE NOTE: If you are using Jest >= v24 or Angular CLI >= v8.2 and using a wallaby configuration file, switching to use automatic configuration may resolve your problem.

https://wallabyjs.com/docs/intro/config.html#automatic-configuration

I can run tests but when I open the Coverage and Test explorer the browser (chrome) says that localhost refused conenction

Wallaby diagnostics report

{
  editorVersion: '1.47.0-insider',
  pluginVersion: '1.0.210',
  editorType: 'VSCode',
  osVersion: 'win32 10.0.19041',
  nodeVersion: 'v12.18.0',
  coreVersion: '1.0.910',
  config: {
    env: { type: 'node', params: {}, runner: 'C:\\Program Files\\nodejs\\node.exe', viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
    files: [
      { pattern: 'src/**/*.ts', ignore: false, trigger: true, load: true, instrument: true, order: 1 },
      { pattern: 'tests/**/*.ts', instrument: false, ignore: false, trigger: true, load: true, order: 2 },
      { pattern: 'tests/Responses/**/*.json', instrument: false, ignore: false, trigger: true, load: true, order: 3 },
      { pattern: 'tests/**/*.spec.ts*', ignore: true, trigger: true, load: true, instrument: true }
    ],
    tests: [ { pattern: 'tests/**/*.spec.ts', ignore: false, trigger: true, load: true, test: true, order: 4 } ],
    compilers: { '**/*.?(lit)coffee?(.md)': [Function] },
    testFramework: { version: 'mocha@2.1.0', configurator: 'mocha@2.1.0', reporter: 'mocha@2.1.0', starter: 'mocha@2.1.0' },
    debug: true,
    diagnostics: {},
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    updateNoMoreThanOneSnapshotPerTestFileRun: false,
    preprocessors: {},
    maxConsoleMessagesPerTest: 100,
    autoConsoleLog: true,
    delays: { run: 0, edit: 100, update: 0 },
    workers: { initial: 0, regular: 0, recycle: false },
    teardown: undefined,
    hints: {
      ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore/',
      ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
      commentAutoLog: '?',
      testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' }
    },
    automaticTestFileSelection: true,
    runSelectedTestsOnly: false,
    extensions: {},
    reportUnhandledPromises: true,
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    loose: undefined,
    configCode: '// Copyright (c) .NET Foundation and contributors. All rights reserved.\r\n' +
      '// Licensed under the MIT license. See LICENSE file in the project root for full license information.\r\n' +
      '\r\n' +
      'module.exports = function (wallaby) {\r\n' +
      '    return {\r\n' +
      '        env: {\r\n' +
      '            type: "node"\r\n' +
      '        },\r\n' +
      '        files: [\r\n' +
      '            "src/**/*.ts",\r\n' +
      '            { pattern: "tests/**/*.ts", instrument: false },            \r\n' +
      '            { pattern: "tests/Responses/**/*.json", instrument: false },     \r\n' +
      '            "!tests/**/*.spec.ts*",\r\n' +
      '        ],\r\n' +
      '        tests: ["tests/**/*.spec.ts"],\r\n' +
      '        compilers: {\r\n' +
      "            '**/*.ts?(x)': wallaby.compilers.typeScript({ })\r\n" +
      '        },\r\n' +
      "        testFramework: 'mocha',\r\n" +
      '        debug: true,\r\n' +
      '        setup: function (wallaby) {\r\n' +
      '            var mocha = wallaby.testFramework;\r\n' +
      '            mocha.timeout(10000);\r\n' +
      '        }\r\n' +
      '    };\r\n' +
      '};\r\n'
  },
  packageJSON: {
    dependencies: { '@microsoft/signalr': '3.1.3', tslib: '1.11.2' },
    devDependencies: {
      '@types/chai': '4.2.11',
      '@types/chai-as-promised': '7.1.2',
      '@types/fetch-mock': '7.3.2',
      '@types/mocha': '7.0.2',
      '@types/node': '13.11.1',
      '@types/node-fetch': '2.5.6',
      chai: '4.2.0',
      'chai-as-promised': '7.1.1',
      'fetch-mock': '9.4.0',
      mkdirp: '1.0.4',
      mocha: '7.1.1',
      'mocha-typescript': '1.1.17',
      'node-fetch': '^2.6.0',
      requirejs: '2.3.6',
      rollup: '2.6.1',
      'rollup-plugin-commonjs': '10.1.0',
      'rollup-plugin-node-resolve': '5.2.0',
      'rollup-plugin-typescript2': '0.27.0',
      'source-map-support': '0.5.16',
      'ts-mocha': '7.0.0',
      'ts-node': '8.8.2',
      typescript: '3.9.5'
    }
  },
  fs: { numberOfFiles: 17 },
  debug: [
    '2020-06-16T10:41:06.144Z project Wallaby Node version: v12.18.0\n',
    '2020-06-16T10:41:06.145Z project Wallaby config: C:\\Users\\dicolomb\\source\\repos\\Public\\interactive\\src\\Microsoft.DotNet.Interactive.Js\\wallaby.js\n',
    '2020-06-16T10:41:06.886Z project File cache: C:\\Users\\dicolomb\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.210\\projects\\9fa6afed7722aad0\n',
    '2020-06-16T10:41:06.935Z uiService Listening port 52742\n',
    '2020-06-16T10:41:06.957Z project package.json file change detected, invalidating local cache\n',
    '2020-06-16T10:41:06.963Z workers Parallelism for initial run: 6, for regular run: 3\n',
    '2020-06-16T10:41:06.963Z workers Starting run worker instance #0\n',
    '2020-06-16T10:41:06.963Z workers Starting run worker instance #1\n',
    '2020-06-16T10:41:06.963Z workers Starting run worker instance #2\n',
    '2020-06-16T10:41:06.963Z workers Starting run worker instance #3\n',
    '2020-06-16T10:41:06.963Z workers Starting run worker instance #4\n',
    '2020-06-16T10:41:06.963Z workers Starting run worker instance #5\n',
    '2020-06-16T10:41:06.965Z workers Web server is listening at 50125\n',
    '2020-06-16T10:41:06.965Z project File cache requires some updates, waiting required files from IDE\n',
    '2020-06-16T10:41:07.454Z workers Started run worker instance (delayed) #2\n',
    '2020-06-16T10:41:07.454Z workers Started run worker instance (delayed) #0\n',
    '2020-06-16T10:41:07.463Z workers Started run worker instance (delayed) #4\n',
    '2020-06-16T10:41:07.529Z workers Started run worker instance (delayed) #1\n',
    '2020-06-16T10:41:07.529Z workers Started run worker instance (delayed) #3\n',
    '2020-06-16T10:41:07.532Z workers Started run worker instance (delayed) #5\n',
    '2020-06-16T10:41:08.128Z project Stopping process pool\n',
    '2020-06-16T10:41:08.130Z project Running postprocessor\n',
    '2020-06-16T10:41:08.133Z postprocessor New TypeScript language service is required\n',
    '2020-06-16T10:41:08.912Z project Postprocessor execution finished\n',
    '2020-06-16T10:41:08.912Z project Test run started; run priority: 3\n',
    '2020-06-16T10:41:08.913Z project Running all tests\n',
    '2020-06-16T10:41:08.914Z workers Starting test run, priority: 3\n',
    '2020-06-16T10:41:08.915Z workers Distributing tests between 6 workers\n',
    '2020-06-16T10:41:08.915Z workers Running tests in parallel\n',
    '2020-06-16T10:41:08.915Z nodeRunner Starting sandbox [worker #0, session #6ti9o]\n',
    '2020-06-16T10:41:08.915Z nodeRunner Starting sandbox [worker #1, session #dakl1]\n',
    '2020-06-16T10:41:08.915Z nodeRunner Starting sandbox [worker #2, session #biq5k]\n',
    '2020-06-16T10:41:08.915Z nodeRunner Starting sandbox [worker #3, session #dqlek]\n',
    '2020-06-16T10:41:08.915Z nodeRunner Starting sandbox [worker #4, session #f3kc0]\n',
    '2020-06-16T10:41:08.916Z nodeRunner Preparing sandbox [worker #0, session #6ti9o]\n',
    '2020-06-16T10:41:08.916Z nodeRunner Preparing sandbox [worker #1, session #dakl1]\n',
    '2020-06-16T10:41:08.916Z nodeRunner Preparing sandbox [worker #2, session #biq5k]\n',
    '2020-06-16T10:41:08.916Z nodeRunner Preparing sandbox [worker #3, session #dqlek]\n',
    '2020-06-16T10:41:08.916Z nodeRunner Preparing sandbox [worker #4, session #f3kc0]\n',
    '2020-06-16T10:41:08.916Z nodeRunner Prepared sandbox [worker #0, session #6ti9o]\n',
    '2020-06-16T10:41:08.916Z nodeRunner Prepared sandbox [worker #1, session #dakl1]\n',
    '2020-06-16T10:41:08.916Z nodeRunner Prepared sandbox [worker #2, session #biq5k]\n',
    '2020-06-16T10:41:08.916Z nodeRunner Prepared sandbox [worker #3, session #dqlek]\n',
    '2020-06-16T10:41:08.916Z nodeRunner Prepared sandbox [worker #4, session #f3kc0]\n',
    '2020-06-16T10:41:08.916Z workers [worker #0, session #6ti9o] Running tests in sandbox\n',
    '2020-06-16T10:41:08.917Z workers [worker #1, session #dakl1] Running tests in sandbox\n',
    '2020-06-16T10:41:08.917Z workers [worker #2, session #biq5k] Running tests in sandbox\n',
    '2020-06-16T10:41:08.917Z workers [worker #3, session #dqlek] Running tests in sandbox\n',
    '2020-06-16T10:41:08.917Z workers [worker #4, session #f3kc0] Running tests in sandbox\n',
    '2020-06-16T10:41:09.404Z workers [dqlek] Loaded 3 test(s)\n',
    '2020-06-16T10:41:09.406Z workers [6ti9o] Loaded 3 test(s)\n',
    '2020-06-16T10:41:09.414Z workers [6ti9o] Test executed: injects function to create scope for dotnet interactive\n',
    '2020-06-16T10:41:09.414Z workers [biq5k] Loaded 1 test(s)\n',
    '2020-06-16T10:41:09.417Z workers [dqlek] Test executed: injects function to create scope for dotnet interactive\n',
    '2020-06-16T10:41:09.418Z workers [6ti9o] Test executed: injects function to create dotnet interactive client\n',
    '2020-06-16T10:41:09.420Z workers [dqlek] Test executed: injects function to create dotnet interactive client\n',
    '2020-06-16T10:41:09.421Z workers [6ti9o] Test executed: can be retrieved\n',
    '2020-06-16T10:41:09.421Z workers [f3kc0] Loaded 2 test(s)\n',
    '2020-06-16T10:41:09.422Z workers [dqlek] Test executed: can be retrieved\n',
    '2020-06-16T10:41:09.428Z workers [6ti9o] Run 3 test(s), skipped 0 test(s)\n',
    '2020-06-16T10:41:09.429Z workers [dakl1] Loaded 3 test(s)\n',
    '2020-06-16T10:41:09.429Z workers [dqlek] Run 3 test(s), skipped 0 test(s)\n',
    '2020-06-16T10:41:09.430Z workers [dakl1] Test executed: can submit code\n',
    '2020-06-16T10:41:09.431Z workers [6ti9o] Sandbox is responsive, closing it\n',
    '2020-06-16T10:41:09.432Z workers [dakl1] Test executed: returns token for correlation\n',
    '2020-06-16T10:41:09.432Z workers [dqlek] Sandbox is responsive, closing it\n',
    '2020-06-16T10:41:09.436Z workers [dakl1] Test executed: sends SubmitCode command\n',
    '2020-06-16T10:41:09.441Z workers [dakl1] Run 3 test(s), skipped 0 test(s)\n',
    '2020-06-16T10:41:09.442Z workers [dakl1] Sandbox is responsive, closing it\n',
    '2020-06-16T10:41:09.445Z workers [f3kc0] Test executed: can load multiple variables in a single request\n',
    '2020-06-16T10:41:09.445Z workers [biq5k] Test executed: creates kernel clients for all discovered kernels\n',
    '2020-06-16T10:41:09.449Z workers [f3kc0] Test executed: can load variable using kernel client\n',
    '2020-06-16T10:41:09.450Z workers [biq5k] Run 1 test(s), skipped 0 test(s)\n',
    '2020-06-16T10:41:09.451Z workers [biq5k] Sandbox is responsive, closing it\n',
    '2020-06-16T10:41:09.455Z workers [f3kc0] Run 2 test(s), skipped 0 test(s)\n',
    '2020-06-16T10:41:09.456Z workers [f3kc0] Sandbox is responsive, closing it\n',
    '2020-06-16T10:41:09.456Z workers Merging parallel test run results\n',
    '2020-06-16T10:41:09.461Z project Test run finished\n',
    '2020-06-16T10:41:09.461Z project Processed console.log entries\n',
    '2020-06-16T10:41:09.461Z project Processed loading sequences\n',
    '2020-06-16T10:41:09.462Z project Processed executed tests\n',
    '2020-06-16T10:41:09.465Z project Processed code coverage\n',
    '2020-06-16T10:41:09.476Z project Test run result processed and sent to IDE\n'
  ]
}
ArtemGovorov commented 4 years ago

Can you please start Wallaby and then open https://wallabyjs.com/app in browser?

colombod commented 4 years ago

That seems to work. but the vscode command sends me to the localhost address

ArtemGovorov commented 4 years ago

but the vscode command sends me to the localhost address

This is expected. The localhost URL is supposed to open the same app https://wallabyjs.com/app in iframe.

Can you please paste the full error that you're getting in Chrome when opening the link in VS Code?

ArtemGovorov commented 4 years ago

Also please share your version of Chrome.

colombod commented 4 years ago

sure image

ArtemGovorov commented 4 years ago

Can you please also paste the full error that you're getting in Chrome when opening the link in VS Code?

colombod commented 4 years ago

image

smcenlly commented 4 years ago

We've created a simple project to test that your network is working correctly outside of Wallaby.

Could you please:

  1. Stop Wallaby in all editors where it is running.
  2. clone this repo that we have created for you
  3. run npm install
  4. run node index.js
  5. In chrome, navigate to http://localhost:51245/

If this is not working for you, then there's something specific to your environment that is not working. Perhaps your hosts file (c:\windows\system32\drivers\etc\hosts) or a firewall setting?

If you have not already tried, you might find that rebooting your machine also fixes the problem.

colombod commented 4 years ago

Thank you it did the trick, the port was stuck.

image