wallabyjs / public

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

Postprocessor run failure: Failed to instrument on commented html code #2276

Closed maplion closed 4 years ago

maplion commented 4 years ago

Issue description or question

"[Error] Postprocessor run failure: Failed to instrument" was happening on an angular component that was commented out (so all pieces: html, scss, ts, were commented out). It shouldn't be parsing commented code; here's the full error:

[Error] Postprocessor run failure: Failed to instrument src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.js 
[Error]    8 | [class { 
[Error]    9 |     }.searchCardExpandButtonCollapsed] = "sidePanelCollapsed"[class { 
[Error] > 10 | }.moveToBottom] = "sidePanelExpanded &&; 
[Error]      |                   ^ SyntaxError: Unterminated string constant (10:18) 
[Error]   11 | !sidePanelCollapsed; 
[Error]   12 | " (click)="; 
[Error]   13 | toggleExpand(); 

I solved the problem by deleting the component/removing it from the project, but I don't feel that should be necessary. Reporting this for awareness.

Wallaby diagnostics report

{
  editorVersion: '1.40.1',
  pluginVersion: '1.0.157',
  editorType: 'VSCode',
  osVersion: 'win32 10.0.19013',
  nodeVersion: 'v12.3.1',
  coreVersion: '1.0.772',
  config: {
    files: [
      { pattern: 'tsconfig.json', ignore: false, trigger: true, load: true, instrument: true, order: 1 },
      { pattern: 'tsconfig.spec.json', ignore: false, trigger: true, load: true, instrument: true, order: 2 },
      { pattern: 'jest.config.js', ignore: false, trigger: true, load: true, instrument: true, order: 3 },
      { pattern: 'src/**/*.+(ts|html|json|snap|css|less|sass|scss|jpg|jpeg|gif|png|svg)', ignore: false, trigger: true, load: true, instrument: true, order: 4 },
      { pattern: '**/*.spec.ts', ignore: true, trigger: true, load: true, instrument: true },
      { pattern: '**/node_modules/**/*', ignore: true, trigger: true, load: true, instrument: true },
      { pattern: '**/dist/**/*', ignore: true, trigger: true, load: true, instrument: true },
      { pattern: '**/*.spec.ts.snap', ignore: false, instrument: false, trigger: true, load: true, order: 5 },
      { pattern: '**/node_modules/**/*.snap', ignore: true, instrument: false, trigger: true, load: true },
      { pattern: '**/dist/**/*.snap', ignore: true, instrument: false, trigger: true, load: true },
      { pattern: 'package.json', ignore: false, instrument: false, trigger: true, load: true, order: 6 }
    ],
    tests: [
      { pattern: '**/*.spec.ts', ignore: false, trigger: true, load: true, test: true, order: 7 },
      { pattern: '**/node_modules/**/*', ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/dist/**/*', ignore: true, trigger: true, load: true, test: true }
    ],
    env: { type: 'node', runner: 'node', params: {}, viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
    compilers: { '**/*.?(lit)coffee?(.md)': [Function] },
    preprocessors: { 'src/**/*.component.ts': [Function: ngxWallabyJest], 'package.json': [Function] },
    testFramework: { version: 'jest@0.4.3', configurator: 'jest@0.4.3', reporter: 'jest@0.4.3', starter: 'jest@0.4.3' },
    debug: false,
    diagnostics: {},
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    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: true,
    configCode: "const ngxWallabyJest = require('ngx-wallaby-jest');\r" +
      '\n\r' +
      '\nmodule.exports = function (wallaby) {\r' +
      '\n    return {\r' +
      '\n        files: [\r' +
      "\n            'tsconfig.json',\r" +
      "\n            'tsconfig.spec.json',\r" +
      "\n            'jest.config.js',\r" +
      "\n            'src/**/*.+(ts|html|json|snap|css|less|sass|scss|jpg|jpeg|gif|png|svg)',\r" +
      "\n            '!**/*.spec.ts',\r" +
      "\n            '!**/node_modules/**/*',\r" +
      "\n            '!**/dist/**/*',\r" +
      '\n        ],\r' +
      '\n\r' +
      '\n        tests: [\r' +
      "\n            '**/*.spec.ts',\r" +
      "\n            '!**/node_modules/**/*',\r" +
      "\n            '!**/dist/**/*',\r" +
      '\n        ],\r' +
      '\n\r' +
      '\n        env: {\r' +
      "\n            type: 'node',\r" +
      "\n            runner: 'node'\r" +
      '\n        },\r' +
      '\n        compilers: {\r' +
      "\n            '**/*.ts?(x)': wallaby.compilers.typeScript({\r" +
      "\n                module: 'commonjs',\r" +
      '\n                getCustomTransformers: () => {\r' +
      '\n                    return {\r' +
      '\n                        before: [\r' +
      "\n                            require('jest-preset-angular/InlineHtmlStripStylesTransformer').factory(\r" +
      "\n                                { compilerModule: require('typescript') }\r" +
      '\n                            )\r' +
      '\n                        ]\r' +
      '\n                    };\r' +
      '\n                }\r' +
      '\n            }),\r' +
      '\n        },\r' +
      '\n        setup: function (wallaby) {\r' +
      "\n            const jestConfig = require('./jest.config.js');\r" +
      "\n            jestConfig.transform = { '^.+\\\\.(ts)$': 'ts-jest' };\r" +
      '\n            // Map our path aliases.\r' +
      '\n            Object.keys(jestConfig.moduleNameMapper).forEach(\r' +
      '\n                k =>\r' +
      '\n                    (jestConfig.moduleNameMapper[k] = jestConfig.moduleNameMapper[k].replace(\r' +
      "\n                        '<rootDir>',\r" +
      '\n                        wallaby.localProjectDir\r' +
      '\n                    ))\r' +
      '\n            );\r' +
      '\n            wallaby.testFramework.configure(jestConfig);\r' +
      '\n        },\r' +
      '\n        preprocessors: {\r' +
      "\n            'src/**/*.component.ts': ngxWallabyJest\r" +
      '\n        },\r' +
      '\n\r' +
      '\n        // hints: {\r' +
      '\n        //     allowIgnoringCoverageInTests: true,\r' +
      '\n        //     ignoreCoverage: /ignore coverage/\r' +
      '\n        // },\r' +
      '\n\r' +
      "\n        testFramework: 'jest',\r" +
      '\n\r' +
      '\n        debug: false\r' +
      '\n    };\r' +
      '\n};'
  },
  packageJSON: {
    dependencies: {
      '@angular-redux/form': '10.0.0',
      '@angular-redux/router': '10.0.0',
      '@angular-redux/store': '10.0.0',
      '@angular/animations': '8.2.14',
      '@angular/common': '8.2.14',
      '@angular/compiler': '8.2.14',
      '@angular/core': '8.2.14',
      '@angular/forms': '8.2.14',
      '@angular/platform-browser': '8.2.14',
      '@angular/platform-browser-dynamic': '8.2.14',
      '@angular/pwa': '0.803.19',
      '@angular/router': '8.2.14',
      '@angular/service-worker': '8.2.14',
      '@ng-bootstrap/ng-bootstrap': '5.1.4',
      'angular-font-awesome': '3.1.2',
      'angular-oauth2-oidc': '8.0.4',
      'arcgis-js-api': '4.13.2',
      bootstrap: '4.3.1',
      'core-js': '3.4.1',
      'esri-loader': '2.12.0',
      'font-awesome': '4.7.0',
      hammerjs: '2.0.8',
      lodash: '4.17.15',
      moment: '2.24.0',
      'ngx-mask': '8.1.6',
      redux: '4.0.4',
      'redux-catch': '^1.3.1',
      'redux-logger': '3.0.6',
      'redux-observable-es6-compat': '^1.2.1',
      rxjs: '6.5.3',
      'zone.js': '0.10.2'
    },
    devDependencies: {
      '@angular-builders/jest': '^8.3.1',
      '@angular-devkit/build-angular': '0.803.19',
      '@angular/cli': '8.3.19',
      '@angular/compiler-cli': '8.2.14',
      '@angular/language-service': '8.2.14',
      '@fortawesome/fontawesome-pro': '5.11.2',
      '@ngneat/spectator': '^4.6.0',
      '@types/arcgis-js-api': '4.13.0',
      '@types/jasmine': '^3.4.6',
      '@types/jasminewd2': '2.0.8',
      '@types/jest': '^24.0.23',
      '@types/moment': '2.13.0',
      '@types/node': '^12.12.11',
      '@types/redux-logger': '3.0.7',
      'aws-sdk': '^2.576.0',
      canvas: '2.6.0',
      chromedriver: '76.0.0',
      'chromedriver-version-matcher': '1.0.0-alpha.5',
      codelyzer: '^5.2.0',
      'jasmine-core': '3.5.0',
      'jasmine-spec-reporter': '4.2.1',
      jest: '24.9.0',
      'jest-extended': '0.11.2',
      'jest-module-name-mapper': '0.1.2',
      'jest-preset-angular': '^7.1.1',
      'jest-sonar-reporter': '^2.0.0',
      'json-server': '0.15.1',
      mockdate: '2.0.5',
      'ngx-wallaby-jest': '0.0.2',
      protractor: '5.4.2',
      'protractor-image-comparison': '3.5.0',
      puppeteer: '1.17.0',
      'redux-devtools-extension': '2.13.8',
      serverless: '^1.58.0',
      'serverless-cf-vars': '0.3.2',
      'serverless-offline': '5.12.0',
      'serverless-plugin-tracing': '2.0.0',
      shelljs: '0.8.3',
      sinon: '7.5.0',
      'ts-node': '^8.5.2',
      'tsconfig-paths-jest': '0.0.1',
      tslint: '^5.20.1',
      typescript: '3.5.3'
    }
  },
  fs: { numberOfFiles: 459 },
  debug: [
    '2019-11-20T21:35:17.753Z project Wallaby Node version: v12.3.1\n',
    '2019-11-20T21:35:17.753Z project Wallaby config: C:\\git\\geocomm\\gc-maps-frontend\\wallaby.js\n',
    '2019-11-20T21:35:21.603Z fs File system scan has finished by timeout\n',
    '2019-11-20T21:35:21.611Z project File cache: C:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\projects\\868611a219a33db6\n',
    '2019-11-20T21:35:21.659Z uiService Listening port 51235\n',
    '2019-11-20T21:35:21.704Z project package.json file change detected, invalidating local cache\n',
    '2019-11-20T21:35:21.891Z workers Parallelism for initial run: 14, for regular run: 7\n',
    '2019-11-20T21:35:21.891Z workers Starting run worker instance #0\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #1\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #2\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #3\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #4\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #5\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #6\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #7\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #8\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #9\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #10\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #11\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #12\n',
    '2019-11-20T21:35:21.892Z workers Starting run worker instance #13\n',
    '2019-11-20T21:35:21.893Z workers Web server is listening at 52809\n',
    '2019-11-20T21:35:21.893Z project File cache requires some updates, waiting required files from IDE\n',
    '2019-11-20T21:35:22.447Z extended-core New document or complex document change\n',
    '2019-11-20T21:35:22.511Z workers Started run worker instance (delayed) #0\n',
    '2019-11-20T21:35:22.512Z workers Started run worker instance (delayed) #2\n',
    '2019-11-20T21:35:22.512Z workers Started run worker instance (delayed) #1\n',
    '2019-11-20T21:35:22.513Z workers Started run worker instance (delayed) #3\n',
    '2019-11-20T21:35:23.057Z workers Started run worker instance (delayed) #4\n',
    '2019-11-20T21:35:23.152Z workers Started run worker instance (delayed) #5\n',
    '2019-11-20T21:35:23.155Z workers Started run worker instance (delayed) #7\n',
    '2019-11-20T21:35:23.163Z workers Started run worker instance (delayed) #6\n',
    '2019-11-20T21:35:23.163Z workers Started run worker instance (delayed) #8\n',
    '2019-11-20T21:35:23.197Z workers Started run worker instance (delayed) #9\n',
    '2019-11-20T21:35:23.328Z workers Started run worker instance (delayed) #10\n',
    '2019-11-20T21:35:23.328Z workers Started run worker instance (delayed) #13\n',
    '2019-11-20T21:35:23.329Z workers Started run worker instance (delayed) #11\n',
    '2019-11-20T21:35:23.329Z workers Started run worker instance (delayed) #12\n',
    '2019-11-20T21:35:24.300Z project Stopping process pool\n',
    '2019-11-20T21:35:24.303Z project Running postprocessor\n',
    '2019-11-20T21:35:24.325Z postprocessor New TypeScript language service is required\n',
    '2019-11-20T21:35:27.594Z project Re-attaching document block comment\n',
    '2019-11-20T21:35:27.594Z project Re-attaching document block comment\n',
    '2019-11-20T21:35:27.606Z project Re-attaching document block comment\n',
    '2019-11-20T21:35:27.628Z project Error: Failed to instrument src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.js\n   8 | [class {\n ' +
      '  9 |     }.searchCardExpandButtonCollapsed] = "sidePanelCollapsed"[class {\n> 10 | }.moveToBottom] = "sidePanelExpanded &&;\n     |                   ^ SyntaxError: Unterminated ' +
      'string constant (10:18)\n  11 | !sidePanelCollapsed;\n  12 | " (click)=";\n  13 | toggleExpand();\n    at Object.formatInstrumentationError ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\server.js:24:30141)\n    at ' +
      'c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\server.js:22:3426\n    at _rejected ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:864:24)\n    at ' +
      'c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:890:30\n    at Promise.when ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:1142:31)\n    at Promise.promise.promiseDispatch ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:808:41)\n    at ' +
      'c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:624:44\n    at runSingle ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:137:13)\n    at flush ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:125:13)\n    at processTicksAndRejections (internal/process/task_queues.js:82:9)\n',
    '2019-11-20T21:35:27.629Z project Test run finished\n',
    '2019-11-20T21:35:27.629Z project Test run data re-queued\n',
    '2019-11-20T21:35:53.635Z fs File deleted: src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.html\n',
    '2019-11-20T21:35:53.638Z fs File deleted: src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.scss\n',
    '2019-11-20T21:35:53.638Z fs File deleted: src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.ts\n',
    '2019-11-20T21:35:53.644Z project Running postprocessor\n',
    '2019-11-20T21:35:56.681Z project Re-attaching document block comment\n',
    '2019-11-20T21:35:56.682Z project Re-attaching document block comment\n',
    '2019-11-20T21:35:56.694Z project Re-attaching document block comment\n',
    '2019-11-20T21:35:56.818Z project Postprocessor execution finished\n',
    '2019-11-20T21:35:56.818Z project Test run started; run priority: 3\n',
    '2019-11-20T21:35:56.818Z project Running all tests\n',
    '2019-11-20T21:35:56.833Z workers Starting test run, priority: 3\n',
    '2019-11-20T21:35:56.833Z workers Distributing tests between 14 workers\n',
    '2019-11-20T21:35:56.833Z workers Running tests in parallel\n',
    '2019-11-20T21:35:56.834Z nodeRunner Starting sandbox [worker #0, session #7fvdx]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Starting sandbox [worker #1, session #2yagn]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Starting sandbox [worker #2, session #22gi2]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Starting sandbox [worker #3, session #ydd6o]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Starting sandbox [worker #4, session #claai]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Starting sandbox [worker #5, session #mhz1l]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Starting sandbox [worker #6, session #9illo]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Starting sandbox [worker #7, session #7xhpa]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Starting sandbox [worker #8, session #hzakr]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Preparing sandbox [worker #0, session #7fvdx]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Preparing sandbox [worker #1, session #2yagn]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Preparing sandbox [worker #2, session #22gi2]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Preparing sandbox [worker #3, session #ydd6o]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Preparing sandbox [worker #4, session #claai]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Preparing sandbox [worker #5, session #mhz1l]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Preparing sandbox [worker #6, session #9illo]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Preparing sandbox [worker #7, session #7xhpa]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Preparing sandbox [worker #8, session #hzakr]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Prepared sandbox [worker #0, session #7fvdx]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Prepared sandbox [worker #1, session #2yagn]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Prepared sandbox [worker #2, session #22gi2]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Prepared sandbox [worker #3, session #ydd6o]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Prepared sandbox [worker #4, session #claai]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Prepared sandbox [worker #5, session #mhz1l]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Prepared sandbox [worker #6, session #9illo]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Prepared sandbox [worker #7, session #7xhpa]\n',
    '2019-11-20T21:35:56.834Z nodeRunner Prepared sandbox [worker #8, session #hzakr]\n',
    '2019-11-20T21:35:56.834Z workers [worker #0, session #7fvdx] Running tests in sandbox\n',
    '2019-11-20T21:35:56.835Z workers [worker #1, session #2yagn] Running tests in sandbox\n',
    '2019-11-20T21:35:56.836Z workers [worker #2, session #22gi2] Running tests in sandbox\n',
    '2019-11-20T21:35:56.836Z workers [worker #3, session #ydd6o] Running tests in sandbox\n',
    '2019-11-20T21:35:56.837Z workers [worker #4, session #claai] Running tests in sandbox\n',
    '2019-11-20T21:35:56.837Z workers [worker #5, session #mhz1l] Running tests in sandbox\n',
    '2019-11-20T21:35:56.837Z workers [worker #6, session #9illo] Running tests in sandbox\n',
    '2019-11-20T21:35:56.838Z workers [worker #7, session #7xhpa] Running tests in sandbox\n',
    '2019-11-20T21:35:56.838Z workers [worker #8, session #hzakr] Running tests in sandbox\n',
    '2019-11-20T21:36:04.350Z workers [9illo] Loaded unknown number of test(s)\n',
    '2019-11-20T21:36:04.350Z workers [9illo] Test executed: temporary time placeholder\n',
    '2019-11-20T21:36:04.356Z workers [7fvdx] Loaded unknown number of test(s)\n',
    '2019-11-20T21:36:04.356Z workers [7fvdx] Test executed: test placeholder\n',
    '2019-11-20T21:36:04.367Z workers [mhz1l] Loaded unknown number of test(s)\n',
    '2019-11-20T21:36:04.368Z workers [mhz1l] Test executed: should sort array by a given property\n',
    '2019-11-20T21:36:04.370Z workers [mhz1l] Test executed: should sort an array by a property of a property\n',
    '2019-11-20T21:36:04.371Z workers [mhz1l] Test executed: should filter an array by property\n',
    '2019-11-20T21:36:04.375Z workers [mhz1l] Test executed: should filter an array by a property of a property\n',
    '2019-11-20T21:36:04.476Z workers [9illo] Run 1 test(s), skipped 0 test(s)\n',
    '2019-11-20T21:36:04.481Z workers [9illo] Sandbox is responsive, closing it\n',
    '2019-11-20T21:36:04.484Z workers [7fvdx] Run 1 test(s), skipped 0 test(s)\n',
    '2019-11-20T21:36:04.488Z workers [7fvdx] Sandbox is responsive, closing it\n',
    '2019-11-20T21:36:04.489Z workers [mhz1l] Run 4 test(s), skipped 0 test(s)\n',
    '2019-11-20T21:36:04.490Z workers [mhz1l] Sandbox is responsive, closing it\n',
    '2019-11-20T21:36:04.955Z workers [22gi2] Loaded unknown number of test(s)\n',
    '2019-11-20T21:36:04.956Z workers [22gi2] Test executed: exists\n',
    '2019-11-20T21:36:05.042Z workers [22gi2] Run 1 test(s), skipped 0 test(s)\n',
    '2019-11-20T21:36:05.043Z workers [22gi2] Sandbox is responsive, closing it\n',
    '2019-11-20T21:36:05.112Z workers [ydd6o] Loaded unknown number of test(s)\n',
    '2019-11-20T21:36:05.113Z workers [ydd6o] Test executed: exists\n',
    '2019-11-20T21:36:05.113Z workers [ydd6o] Test executed: Subject: it checks comboBox items are emitting\n',
    '2019-11-20T21:36:05.115Z workers [ydd6o] Test executed: Subject: it checks comboBox Blur is emitting\n',
    '2019-11-20T21:36:05.115Z workers [ydd6o] Test executed: Subject: it checks status button items are emitting\n',
    '2019-11-20T21:36:05.115Z workers [ydd6o] Test executed: Subject: it checks status button form items are emitting\n',
    '2019-11-20T21:36:05.115Z workers [ydd6o] Test executed: Subject: it checks save button form items are emitting\n',
    '2019-11-20T21:36:05.208Z workers [ydd6o] Run 6 test(s), skipped 0 test(s)\n',
    '2019-11-20T21:36:05.209Z workers [ydd6o] Sandbox is responsive, closing it\n',
    '2019-11-20T21:36:08.816Z workers [7xhpa] Loaded unknown number of test(s)\n',
    '2019-11-20T21:36:08.816Z workers [7xhpa] Test executed: should be created\n',
    '2019-11-20T21:36:08.867Z workers [7xhpa] Run 1 test(s), skipped 0 test(s)\n',
    '2019-11-20T21:36:08.869Z workers [7xhpa] Sandbox is responsive, closing it\n',
    '2019-11-20T21:36:09.060Z workers [claai] Loaded unknown number of test(s)\n',
    '2019-11-20T21:36:09.060Z workers [claai] Test executed: should merge objects in two separate arrays that have a matching id\n',
    '2019-11-20T21:36:09.061Z workers [claai] Test executed: remove an item from the array if it is found in the array\n',
    '2019-11-20T21:36:09.121Z workers [claai] Run 2 test(s), skipped 0 test(s)\n',
    '2019-11-20T21:36:09.123Z workers [claai] Sandbox is responsive, closing it\n',
    '2019-11-20T21:36:09.451Z workers [2yagn] Loaded unknown number of test(s)\n',
    '2019-11-20T21:36:09.488Z workers [2yagn] Test executed: should create\n',
    '2019-11-20T21:36:09.496Z workers [2yagn] Test executed: basemap has a default value\n',
    '2019-11-20T21:36:09.496Z workers [2yagn] Test executed: center has a default value\n',
    '2019-11-20T21:36:09.496Z workers [2yagn] Test executed: zoom has a default value\n',
    '2019-11-20T21:36:09.555Z workers [2yagn] Run 4 test(s), skipped 0 test(s)\n',
    '2019-11-20T21:36:09.557Z workers [2yagn] Sandbox is responsive, closing it\n',
    '2019-11-20T21:36:09.810Z workers [hzakr] Loaded unknown number of test(s)\n',
    '2019-11-20T21:36:09.811Z workers [hzakr] Test executed: should call `DISCONNECTED` when disconnected\n',
    '2019-11-20T21:36:09.811Z workers [hzakr] Test executed: should close websocket stream and call `DISCONNECTED` when calling `DISCONNECT` with no retry\n',
    '2019-11-20T21:36:09.811Z workers [hzakr] Test executed: should call `CONNECT` when calling `DISCONNECT` with retry\n',
    '2019-11-20T21:36:09.812Z workers [hzakr] Test executed: should call `CONNECTED` when connected\n',
    '2019-11-20T21:36:09.812Z workers [hzakr] Test executed: should correctly call `PING` on WebSocket\n',
    '2019-11-20T21:36:09.812Z workers [hzakr] Test executed: should correctly `SEND_MESSAGE` on WebSocket\n',
    '2019-11-20T21:36:09.812Z workers [hzakr] Test executed: should return `PING` after timer time has passed\n',
    '2019-11-20T21:36:09.813Z workers [hzakr] Test executed: should return `PING_RESPONSE_TIMER_FAILED` when an error occurs (e.g. invalid state object)\n',
    '2019-11-20T21:36:09.813Z workers [hzakr] Test executed: should return `DISCONNECT` with a retry when pong not received\n',
    '2019-11-20T21:36:09.813Z workers [hzakr] Test executed: should return `HEALTH_CHECK_PASSED` when pong received\n',
    '2019-11-20T21:36:09.870Z workers [hzakr] Run 10 test(s), skipped 0 test(s)\n',
    '2019-11-20T21:36:09.872Z workers [hzakr] Sandbox is responsive, closing it\n',
    '2019-11-20T21:36:09.873Z workers Merging parallel test run results\n',
    '2019-11-20T21:36:09.880Z project Test run finished\n',
    '2019-11-20T21:36:09.880Z project Processed console.log entries\n',
    '2019-11-20T21:36:09.880Z project Processed loading sequences\n',
    '2019-11-20T21:36:09.881Z project Processed executed tests\n',
    '2019-11-20T21:36:09.887Z project Processed code coverage\n',
    '2019-11-20T21:36:09.923Z project Test run result processed and sent to IDE\n',
    '2019-11-20T21:38:51.165Z fs File changed: src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.html\n',
    '2019-11-20T21:38:51.165Z fs No metadata for changed file found: src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.html\n',
    '2019-11-20T21:38:51.168Z fs File changed: src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.scss\n',
    '2019-11-20T21:38:51.168Z fs No metadata for changed file found: src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.scss\n',
    '2019-11-20T21:38:51.168Z fs File changed: src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.ts\n',
    '2019-11-20T21:38:51.168Z fs No metadata for changed file found: src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.ts\n',
    '2019-11-20T21:38:51.250Z project Running postprocessor\n',
    '2019-11-20T21:38:51.251Z testTask Test files from affected: 0, from deleted or manually requested: 0, from recently changed: 0, from loaded by: 0, from failing: 0\n',
    '2019-11-20T21:38:51.802Z project Error: Failed to instrument src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component.js\n   8 | [class {\n ' +
      '  9 |     }.searchCardExpandButtonCollapsed] = "sidePanelCollapsed"[class {\n> 10 | }.moveToBottom] = "sidePanelExpanded &&;\n     |                   ^ SyntaxError: Unterminated ' +
      'string constant (10:18)\n  11 | !sidePanelCollapsed;\n  12 | " (click)=";\n  13 | toggleExpand();\n    at Object.formatInstrumentationError ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\server.js:24:30141)\n    at ' +
      'c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\server.js:22:3426\n    at _rejected ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:864:24)\n    at ' +
      'c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:890:30\n    at Promise.when ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:1142:31)\n    at Promise.promise.promiseDispatch ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:808:41)\n    at ' +
      'c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:624:44\n    at runSingle ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:137:13)\n    at flush ' +
      '(c:\\Users\\ryand\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.157\\wallaby\\node_modules\\q\\q.js:125:13)\n    at processTicksAndRejections (internal/process/task_queues.js:82:9)\n',
    '2019-11-20T21:38:51.802Z project Test run finished\n',
    '2019-11-20T21:38:51.802Z project Test run data re-queued\n'
  ]
}
smcenlly commented 4 years ago

Could you please change your project to use our automatic configuration feature to see if that fixes your problem?

It looks like you may also be running in an nx/nrwl mono-repo, in which case, please also read our updated docs on nx/nrwl.

ArtemGovorov commented 4 years ago

Also, is there any way you could share the src/app/shared/navigation/components/search-card-expand-button/search-card-expand-button.component file with us (here or via hello@wallabyjs.com email)? From the code snippet it looks like it's not commented out, but we'll need full content to investigate.

maplion commented 4 years ago

@ArtemGovorov This has been sent. @smcenlly I don't really have problems with the current config; is there an advantage to the automatic config?

Also, I read the updated docs on nx/nrwl and I'm not sure I follow how to make that relevant in that other than this edge case, Wallaby has been working fine after my initial setup (and Jest works from command line as well).

smcenlly commented 4 years ago

This has been sent.

Thanks for sending through your sample. We have isolated the problem to ngx-wallaby-jest. The ngx-wallaby-jest package does not take into account when a file (or parts of a file) are commented out.

The ngx-wallaby-jest is not maintained by the wallaby team and is a community maintained plugin. You may like to raise an issue, or else contribute a fix? We made a brief attempt to fix the issue but realized that the fix may be quite involved with edge cases, inline/block comments and the need to maintain character and line positions.

I don't really have problems with the current config; is there an advantage to the automatic config?

If everything is working for you "as is" with your current configuration, then you do not need to update (although we do think it's a good idea). One limitation right now is obviously that you will not be able to comment out your component files. A couple of things to consider:

1) You only need to maintain your test configuration in one place. If Wallaby works without a configuration file, why have the overhead of an additional/unnecessary configuration file?

2) When you create a wallaby configuration file, you are effectively defining the Wallaby runtime environment, adjusting the configuration to be as close to jest as possible. When you use automatic configuration, wallaby runs using the same runtime as if you were testing natively in jest. This can often times speed up your test execution and will also fix problems like the one you described above.

In your case, if you were to use automatic configuration, the jest-preset-angular will set astTransformers that are used by ts-jest when it starts the TypeScript compiler that performs the same task that ngx-wallaby-jest is failing to do when your file is commented. When you use a wallaby configuration file, ts-jest is not able to be used because Wallaby needs to take control of TypeScript compilation to maintain correct line mappings. This limitation does not exist with automatic configuration and ts-jest can and will be used just as if you were running with jest.

--

Please let us know if you switch to using automatic configuration and have problems, we're happy to help.

maplion commented 4 years ago

@smcenlly Thank you for the detailed explanation. If I understand what you're saying correctly, with the automatic configuration, besides the other added benefits, I should be able to do away with the need for the ngx-wallaby-jest?

On Wed, Nov 20, 2019, 9:44 PM Simon McEnlly notifications@github.com wrote:

This has been sent.

Thanks for sending through your sample. We have isolated the problem to ngx-wallaby-jest. The ngx-wallaby-jest package does not take into account when a file (or parts of a file) are commented out.

The ngx-wallaby-jest is not maintained by the wallaby team and is a community maintained plugin. You may like to raise an issue https://github.com/bovandersteene/ngx-wallaby-jest/issues, or else contribute a fix? We made a brief attempt to fix the issue but realized that the fix may be quite involved with edge cases, inline/block comments and the need to maintain character and line positions.

I don't really have problems with the current config; is there an advantage to the automatic config?

If everything is working for you "as is" with your current configuration, then you do not need to update (although we do think it's a good idea). One limitation right now is obviously that you will not be able to comment out your component files. A couple of things to consider:

1.

You only need to maintain your test configuration in one place. If Wallaby works without a configuration file, why have the overhead of an additional/unnecessary configuration file? 2.

When you create a wallaby configuration file, you are effectively defining the Wallaby runtime environment, adjusting the configuration to be as close to jest as possible. When you use automatic configuration, wallaby runs using the same runtime as if you were testing natively in jest. This can often times speed up your test execution and will also fix problems like the one you described above.

In your case, if you were to use automatic configuration, the jest-preset-angular will set astTransformers that are used by ts-jest when it starts the TypeScript compiler that performs the same task that ngx-wallaby-jest is failing to do when your file is commented. When you use a wallaby configuration file, ts-jest is not able to be used because Wallaby needs to take control of TypeScript compilation to maintain correct line mappings. This limitation does not exist with automatic configuration and ts-jest can and will be used just as if you were running with jest.

--

Please let us know if you switch to using automatic configuration and have problems, we're happy to help.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wallabyjs/public/issues/2276?email_source=notifications&email_token=ACD7AMJATANHKF7CJF25YTTQUYG3LA5CNFSM4JPZXFZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEY6HLY#issuecomment-556917679, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD7AMJF6KKZDUX2MENOGBLQUYG3LANCNFSM4JPZXFZQ .

smcenlly commented 4 years ago

Yes - that is correct.

maplion commented 4 years ago

For completeness, just wanted to mention that I made the changes you recommended and they worked for me. Thanks again.