wallabyjs / public

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

Image data getting corrupted #2375

Closed jljorgenson18 closed 4 years ago

jljorgenson18 commented 4 years ago

Issue description or question

We are using Webpack with the Webpack postprocessor https://wallabyjs.com/docs/integration/webpack-built-in.html. Within our Webpack config, we use file-loader and url-loader to load in image files. However, the image data we receive when attempting to load the image is corrupted and our image tests fail as a result.

For example, we have this black rectangle image file that is base64 encoded via url-loader into the following

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAOSURBVChTYxgFJAMGBgABNgABY8OiGAAAAABJRU5ErkJggg==

But when running tests in Wallaby, we get the following

data:image/png;base64,77+9UE5HDQoaCgAAAA1JSERSAAAACgAAAAoIAgAAAAJQWO+/vQAAAAFzUkdCAO+/ve+/vRzvv70AAAAEZ0FNQQAA77+977+9C++/vWEFAAAACXBIWXMAAA7vv70AAA7vv70B77+9b++/vWQAAAAOSURBVChTYxgFJAMGBgABNgABY8OiGAAAAABJRU5E77+9QmDvv70=

Which then fails to load the image as it is corrupted. Note: The image is in the tests/images directory

Also, we are setting "binary: true" on the Wallaby directory for our test images and it is not helping.

Wallaby diagnostics report

Note: I am skipping some of the diagnostic report because of proprietary information. Please let me know if you need more information.

{
  editorVersion: '1.43.2',
  pluginVersion: '1.0.185',
  editorType: 'VSCode',
  osVersion: 'darwin 19.3.0',
  nodeVersion: 'v12.10.0',
  coreVersion: '1.0.869',
  config: {
    files: [
      { pattern: 'node_modules/react/umd/react.development.js', instrument: false, ignore: false, trigger: true, load: true, order: 1 },
      { pattern: 'node_modules/react-dom/umd/react-dom.development.js', instrument: false, ignore: false, trigger: true, load: true, order: 2 },
      { pattern: 'node_modules/yjs/y.js', instrument: false, ignore: false, trigger: true, load: true, order: 3 },
      { pattern: 'node_modules/chai/chai.js', instrument: false, ignore: false, trigger: true, load: true, order: 4 },
      { pattern: 'node_modules/sinon/pkg/sinon-no-sourcemaps.js', instrument: false, ignore: false, trigger: true, load: true, order: 5 },
      { pattern: 'images/**/*', instrument: false, load: false, binary: true, ignore: false, trigger: true, order: 6 },
      { pattern: 'tests/**/*.+(css|less|scss)', instrument: false, load: false, ignore: false, trigger: true, order: 7 },
      { pattern: 'tests/auxiliary/**/*', instrument: true, load: false, ignore: false, trigger: true, order: 8 },
      { pattern: 'tests/resources/**/*', instrument: false, load: false, ignore: false, trigger: true, order: 9 },
      { pattern: 'tests/qa/resources/**/*', instrument: false, load: false, binary: true, ignore: false, trigger: true, order: 10 },
      { pattern: 'tests/images/**/*', instrument: false, load: false, binary: true, ignore: false, trigger: true, order: 11 },
      { pattern: 'tests/setup.ts', instrument: true, load: false, ignore: false, trigger: true, order: 12 },
      { pattern: 'tests/wallabySetup.js', instrument: true, load: false, ignore: false, trigger: true, order: 13 },
      { pattern: 'src/**/*.+(css|less|scss)', instrument: false, load: false, ignore: false, trigger: true, order: 14 },
      { pattern: 'src/apps/uno/**/*', instrument: false, load: false, ignore: false, trigger: true, order: 15 },
      { pattern: 'src/**/*', instrument: true, load: false, ignore: false, trigger: true, order: 16 }
    ],
    tests: [
      { pattern: 'tests/unit/**/*', load: false, ignore: false, trigger: true, test: true, order: 17 },
      { pattern: 'tests/sys/peso/**/*', load: false, ignore: false, trigger: true, test: true, order: 18 },
      { pattern: 'tests/qa/peso/**/*', load: false, ignore: false, trigger: true, test: true, order: 19 }
    ],
    testFramework: { version: 'mocha@3.2.0', configurator: 'mocha@2.0.1', reporter: 'mocha@2.0.1', starter: 'mocha@2.0.1' },
    env: { kind: 'chrome', type: 'browser', params: {}, viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
    debug: false,
    diagnostics: {},
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    compilers: {},
    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: false,
    throwOnBeforeUnload: true,
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    loose: true,
    configCode: '/* eslint-disable import/no-extraneous-dependencies */\n' +
      "process.env.NODE_ENV = 'wallaby';\n" +
      'process.env.SKIP_SLOW_TESTS = true;\n' +
      "const path = require('path');\n" +
      "const webpack = require('webpack');\n" +
      "const webpackConfig = require('./webpack.config.js');\n" +
      '\n' +
      'const getWallabyWebpackConfig = () => {\n' +
      '    const wallabyWebpackConfig = {\n' +
      '        ...webpackConfig,\n' +
      '        devtool: undefined,\n' +
      "        // This helps speed up the build so we don't add these files to the bundle each time\n" +
      '        externals: {\n' +
      '            // Use external version of React and ReactDOM\n' +
      "            react: 'React',\n" +
      "            'react-dom': 'ReactDOM',\n" +
      "            yjs: 'Y',\n" +
      "            chai: 'chai',\n" +
      "            sinon: 'sinon'\n" +
      '        }\n' +
      '    };\n' +
      '    delete wallabyWebpackConfig.entry;\n' +
      '    delete wallabyWebpackConfig.watchOptions;\n' +
      '    delete wallabyWebpackConfig.output;\n' +
      '    delete wallabyWebpackConfig.optimization;\n' +
      '    const allowedPlugins = {\n' +
      '        ProvidePlugin: true,\n' +
      '        DefinePlugin: true,\n' +
      '        IgnorePlugin: true,\n' +
      '        CopyPlugin: true\n' +
      '    };\n' +
      '    wallabyWebpackConfig.plugins = wallabyWebpackConfig.plugins.filter(\n' +
      '        plugin => allowedPlugins[plugin.constructor.name]\n' +
      '    );\n' +
      "    wallabyWebpackConfig.plugins.push(new webpack.NormalModuleReplacementPlugin(/\\.svg$/, 'node-noop'));\n" +
      "    wallabyWebpackConfig.plugins.push(new webpack.NormalModuleReplacementPlugin(/\\.less$/, 'node-noop'));\n" +
      "    wallabyWebpackConfig.resolve.alias.tests = path.join(__dirname, 'tests');\n" +
      '    return wallabyWebpackConfig;\n' +
      '};\n' +
      '\n' +
      'module.exports = wallaby => {\n' +
      '    return {\n' +
      '        files: [\n' +
      '            // Files we want loaded via script tag for performance reasons\n' +
      "            { pattern: 'node_modules/react/umd/react.development.js', instrument: false },\n" +
      "            { pattern: 'node_modules/react-dom/umd/react-dom.development.js', instrument: false },\n" +
      "            { pattern: 'node_modules/yjs/y.js', instrument: false },\n" +
      "            { pattern: 'node_modules/chai/chai.js', instrument: false },\n" +
      "            { pattern: 'node_modules/sinon/pkg/sinon-no-sourcemaps.js', instrument: false },\n" +
      '            // Extra stuff\n' +
      "            { pattern: 'images/**/*', instrument: false, load: false, binary: true },\n" +
      '            // Test Files\n' +
      "            { pattern: 'tests/**/*.+(css|less|scss)', instrument: false, load: false },\n" +
      "            { pattern: 'tests/auxiliary/**/*', instrument: true, load: false },\n" +
      "            { pattern: 'tests/resources/**/*', instrument: false, load: false },\n" +
      "            { pattern: 'tests/qa/resources/**/*', instrument: false, load: false, binary: true },\n" +
      "            { pattern: 'tests/images/**/*', instrument: false, load: false, binary: true },\n" +
      "            { pattern: 'tests/setup.ts', instrument: true, load: false },\n" +
      "            { pattern: 'tests/wallabySetup.js', instrument: true, load: false },\n" +
      '            // Primary Code\n' +
      "            { pattern: 'src/**/*.+(css|less|scss)', instrument: false, load: false },\n" +
      "            { pattern: 'src/apps/uno/**/*', instrument: false, load: false }, // Speed up the build by not instrumenting uno code\n" +
      "            { pattern: 'src/**/*', instrument: true, load: false }\n" +
      '        ],\n' +
      '\n' +
      '        tests: [\n' +
      "            { pattern: 'tests/unit/**/*', load: false },\n" +
      "            { pattern: 'tests/sys/peso/**/*', load: false },\n" +
      "            { pattern: 'tests/qa/peso/**/*', load: false }\n" +
      '        ],\n' +
      '\n' +
      "        testFramework: 'mocha',\n" +
      '\n' +
      '        env: {\n' +
      "            kind: 'chrome'\n" +
      '            /** Uncomment these params to debug weird Wallaby issues in a browser instance */\n' +
      '            // params: {\n' +
      "            //     runner: '--disable-gpu'\n" +
      '            // },\n' +
      '            // keepTabsOpened: true\n' +
      '        },\n' +
      '\n' +
      '        postprocessor: wallaby.postprocessors.webpack(getWallabyWebpackConfig(), {\n' +
      "            setupFiles: ['tests/wallabySetup.js']\n" +
      '        }),\n' +
      '\n' +
      '        debug: false,\n' +
      '\n' +
      '        setup() {\n' +
      '            mocha.setup({ timeout: 20000 });\n' +
      "            EN.listenTo('ready', () => window.__moduleBundler.loadTests());\n" +
      '        }\n' +
      '    };\n' +
      '};\n'
  },
  packageJSON: "Skipping because of sensitive information",
  fs: { numberOfFiles: 1568 },
  debug: [
    '2020-03-24T21:02:03.143Z project Wallaby Node version: v12.10.0\n',
    '2020-03-24T21:02:03.143Z project Wallaby config: <homeDir>/projects/uno/wallaby.js\n',
    '2020-03-24T21:02:04.373Z project File cache: <homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.185/projects/7634f57fffed454d\n',
    '2020-03-24T21:02:04.383Z uiService Listening port 51235\n',
    '2020-03-24T21:02:04.412Z project Config file change detected, invalidating local cache\n',
    '2020-03-24T21:02:09.956Z workers Parallelism for initial run: 10, for regular run: 5\n',
    '2020-03-24T21:02:09.956Z workers Starting run worker instance #0\n',
    '2020-03-24T21:02:09.956Z workers Starting run worker instance #1\n',
    '2020-03-24T21:02:09.956Z workers Starting run worker instance #2\n',
    '2020-03-24T21:02:09.956Z workers Starting run worker instance #3\n',
    '2020-03-24T21:02:09.956Z workers Starting run worker instance #4\n',
    '2020-03-24T21:02:09.956Z workers Starting run worker instance #5\n',
    '2020-03-24T21:02:09.956Z workers Starting run worker instance #6\n',
    '2020-03-24T21:02:09.956Z workers Starting run worker instance #7\n',
    '2020-03-24T21:02:09.956Z workers Starting run worker instance #8\n',
    '2020-03-24T21:02:09.956Z workers Starting run worker instance #9\n',
    '2020-03-24T21:02:09.957Z workers Web server is listening at 49618\n',
    '2020-03-24T21:02:09.973Z project Stopping process pool\n',
    '2020-03-24T21:02:09.973Z project File cache is up-to-date, starting full test run\n',
    '2020-03-24T21:02:09.977Z project Running postprocessor\n',
    '2020-03-24T21:02:09.992Z postprocessor Processing started.\n',
    '2020-03-24T21:02:09.992Z postprocessor Initializing.\n',
    '2020-03-24T21:02:09.993Z postprocessor Initializing entry.\n',
    '2020-03-24T21:02:09.993Z postprocessor Sanitizing configuration.\n',
    '2020-03-24T21:02:09.993Z postprocessor Adjusting configuration.\n',
    '2020-03-24T21:02:09.993Z postprocessor Creating compiler.\n',
    '2020-03-24T21:02:10.112Z postprocessor Customizing compiler.\n',
    '2020-03-24T21:02:10.113Z postprocessor Compilation started.\n',
    '2020-03-24T21:02:10.133Z workers Started run worker instance (immediate) #0\n',
    '2020-03-24T21:02:10.133Z workers Started run worker instance (immediate) #1\n',
    '2020-03-24T21:02:10.133Z workers Started run worker instance (immediate) #2\n',
    '2020-03-24T21:02:10.133Z workers Started run worker instance (immediate) #3\n',
    '2020-03-24T21:02:10.133Z workers Started run worker instance (immediate) #4\n',
    '2020-03-24T21:02:10.133Z workers Started run worker instance (immediate) #5\n',
    '2020-03-24T21:02:10.133Z workers Started run worker instance (immediate) #6\n',
    '2020-03-24T21:02:10.133Z workers Started run worker instance (immediate) #7\n',
    '2020-03-24T21:02:10.133Z workers Started run worker instance (immediate) #8\n',
    '2020-03-24T21:02:10.133Z workers Started run worker instance (immediate) #9\n',
    '2020-03-24T21:02:44.098Z postprocessor Compilation finished.\n',
    '2020-03-24T21:02:54.818Z postprocessor Emitting 3546 files.\n',
    '2020-03-24T21:02:54.878Z postprocessor Processing finished.\n',
    '2020-03-24T21:02:55.182Z project Postprocessor execution finished\n',
    '2020-03-24T21:02:55.182Z project Test run started; run priority: 3\n',
    '2020-03-24T21:02:55.197Z project Running all tests\n',
    '2020-03-24T21:02:55.251Z workers Starting test run, priority: 3\n',
    '2020-03-24T21:02:55.251Z workers Distributing tests between 10 workers\n',
    '2020-03-24T21:02:55.257Z workers Running tests in parallel\n',
    '2020-03-24T21:02:55.257Z chromeRunner Starting sandbox [worker #0, session #2omqm]\n',
    '2020-03-24T21:02:55.258Z chromeRunner Starting sandbox [worker #1, session #qjlwd]\n',
    '2020-03-24T21:02:55.258Z chromeRunner Starting sandbox [worker #2, session #xfvzl]\n',
    '2020-03-24T21:02:55.258Z chromeRunner Starting sandbox [worker #3, session #n15iz]\n',
    '2020-03-24T21:02:55.258Z chromeRunner Starting sandbox [worker #4, session #brfgk]\n',
    '2020-03-24T21:02:55.258Z chromeRunner Starting sandbox [worker #5, session #jj840]\n',
    '2020-03-24T21:02:55.258Z chromeRunner Starting sandbox [worker #6, session #duc4s]\n',
    '2020-03-24T21:02:55.258Z chromeRunner Starting sandbox [worker #7, session #mz2k7]\n',
    '2020-03-24T21:02:55.258Z chromeRunner Starting sandbox [worker #8, session #g5ojs]\n',
    '2020-03-24T21:02:55.258Z chromeRunner Starting sandbox [worker #9, session #0iucw]\n',
    '2020-03-24T21:02:55.258Z chromeRunner Preparing sandbox [worker #0, session #2omqm]\n',
    '2020-03-24T21:02:55.262Z browserRunner Total files to load in sandbox: 28\n',
    '2020-03-24T21:02:55.267Z browserRunner Sandbox is generated [worker #0, session #2omqm]: http://localhost:49618/wallaby_sandbox0.html\n',
    '2020-03-24T21:02:55.267Z chromeRunner Preparing sandbox [worker #1, session #qjlwd]\n',
    '2020-03-24T21:02:55.269Z browserRunner Total files to load in sandbox: 27\n',
    '2020-03-24T21:02:55.275Z browserRunner Sandbox is generated [worker #1, session #qjlwd]: http://localhost:49618/wallaby_sandbox1.html\n',
    '2020-03-24T21:02:55.275Z chromeRunner Preparing sandbox [worker #2, session #xfvzl]\n',
    '2020-03-24T21:02:55.277Z browserRunner Total files to load in sandbox: 27\n',
    '2020-03-24T21:02:55.281Z browserRunner Sandbox is generated [worker #2, session #xfvzl]: http://localhost:49618/wallaby_sandbox2.html\n',
    '2020-03-24T21:02:55.281Z chromeRunner Preparing sandbox [worker #3, session #n15iz]\n',
    '2020-03-24T21:02:55.282Z browserRunner Total files to load in sandbox: 27\n',
    '2020-03-24T21:02:55.286Z browserRunner Sandbox is generated [worker #3, session #n15iz]: http://localhost:49618/wallaby_sandbox3.html\n',
    '2020-03-24T21:02:55.286Z chromeRunner Preparing sandbox [worker #4, session #brfgk]\n',
    '2020-03-24T21:02:55.287Z browserRunner Total files to load in sandbox: 28\n',
    '2020-03-24T21:02:55.290Z browserRunner Sandbox is generated [worker #4, session #brfgk]: http://localhost:49618/wallaby_sandbox4.html\n',
    '2020-03-24T21:02:55.290Z chromeRunner Preparing sandbox [worker #5, session #jj840]\n',
    '2020-03-24T21:02:55.292Z browserRunner Total files to load in sandbox: 28\n',
    '2020-03-24T21:02:55.303Z browserRunner Sandbox is generated [worker #5, session #jj840]: http://localhost:49618/wallaby_sandbox5.html\n',
    '2020-03-24T21:02:55.303Z chromeRunner Preparing sandbox [worker #6, session #duc4s]\n',
    '2020-03-24T21:02:55.305Z browserRunner Total files to load in sandbox: 28\n',
    '2020-03-24T21:02:55.309Z browserRunner Sandbox is generated [worker #6, session #duc4s]: http://localhost:49618/wallaby_sandbox6.html\n',
    '2020-03-24T21:02:55.309Z chromeRunner Preparing sandbox [worker #7, session #mz2k7]\n',
    '2020-03-24T21:02:55.310Z browserRunner Total files to load in sandbox: 27\n',
    '2020-03-24T21:02:55.314Z browserRunner Sandbox is generated [worker #7, session #mz2k7]: http://localhost:49618/wallaby_sandbox7.html\n',
    '2020-03-24T21:02:55.314Z chromeRunner Preparing sandbox [worker #8, session #g5ojs]\n',
    '2020-03-24T21:02:55.315Z browserRunner Total files to load in sandbox: 27\n',
    '2020-03-24T21:02:55.319Z browserRunner Sandbox is generated [worker #8, session #g5ojs]: http://localhost:49618/wallaby_sandbox8.html\n',
    '2020-03-24T21:02:55.319Z chromeRunner Preparing sandbox [worker #9, session #0iucw]\n',
    '2020-03-24T21:02:55.320Z browserRunner Total files to load in sandbox: 27\n',
    '2020-03-24T21:02:55.324Z browserRunner Sandbox is generated [worker #9, session #0iucw]: http://localhost:49618/wallaby_sandbox9.html\n',
    '2020-03-24T21:02:55.324Z chromeRunner Prepared sandbox [worker #0, session #2omqm]\n',
    '2020-03-24T21:02:55.324Z chromeRunner Prepared sandbox [worker #1, session #qjlwd]\n',
    '2020-03-24T21:02:55.324Z chromeRunner Prepared sandbox [worker #2, session #xfvzl]\n',
    '2020-03-24T21:02:55.324Z chromeRunner Prepared sandbox [worker #3, session #n15iz]\n',
    '2020-03-24T21:02:55.324Z chromeRunner Prepared sandbox [worker #4, session #brfgk]\n',
    '2020-03-24T21:02:55.324Z chromeRunner Prepared sandbox [worker #5, session #jj840]\n',
    '2020-03-24T21:02:55.324Z chromeRunner Prepared sandbox [worker #6, session #duc4s]\n',
    '2020-03-24T21:02:55.324Z chromeRunner Prepared sandbox [worker #7, session #mz2k7]\n',
    '2020-03-24T21:02:55.324Z chromeRunner Prepared sandbox [worker #8, session #g5ojs]\n',
    '2020-03-24T21:02:55.324Z chromeRunner Prepared sandbox [worker #9, session #0iucw]\n',
    '2020-03-24T21:02:55.324Z workers [worker #0, session #2omqm] Running tests in sandbox\n',
    '2020-03-24T21:02:55.327Z workers [worker #1, session #qjlwd] Running tests in sandbox\n',
    '2020-03-24T21:02:55.327Z workers [worker #2, session #xfvzl] Running tests in sandbox\n',
    '2020-03-24T21:02:55.328Z workers [worker #3, session #n15iz] Running tests in sandbox\n',
    '2020-03-24T21:02:55.328Z workers [worker #4, session #brfgk] Running tests in sandbox\n',
    '2020-03-24T21:02:55.328Z workers [worker #5, session #jj840] Running tests in sandbox\n',
    '2020-03-24T21:02:55.328Z workers [worker #6, session #duc4s] Running tests in sandbox\n',
    '2020-03-24T21:02:55.328Z workers [worker #7, session #mz2k7] Running tests in sandbox\n',
    '2020-03-24T21:02:55.329Z workers [worker #8, session #g5ojs] Running tests in sandbox\n',
    '2020-03-24T21:02:55.329Z workers [worker #9, session #0iucw] Running tests in sandbox\n',
    '2020-03-24T21:02:59.858Z workers [duc4s] Loaded 117 test(s)\n',
    '2020-03-24T21:02:59.896Z workers [jj840] Loaded 117 test(s)\n',
    '2020-03-24T21:02:59.991Z workers [g5ojs] Loaded 24 test(s)\n',
    '2020-03-24T21:03:00.025Z workers [2omqm] Loaded 172 test(s)\n',
    '2020-03-24T21:03:00.046Z workers [xfvzl] Loaded 191 test(s)\n',
    '2020-03-24T21:03:00.055Z workers [qjlwd] Loaded 160 test(s)\n',
    '2020-03-24T21:03:00.208Z workers [n15iz] Loaded 177 test(s)\n',
    '2020-03-24T21:03:00.259Z workers [mz2k7] Loaded 205 test(s)\n',
    '2020-03-24T21:03:00.283Z workers [brfgk] Loaded 185 test(s)\n',
    '2020-03-24T21:03:00.443Z workers [0iucw] Loaded 262 test(s)\n',
    '// Skipping test names',
    '2020-03-24T21:03:48.679Z workers [xfvzl] Run 189 test(s), skipped 2 test(s)\n',
    '2020-03-24T21:03:48.680Z workers [xfvzl] Sandbox is responsive, closing it\n',
    '2020-03-24T21:03:48.682Z workers [0iucw] Run 237 test(s), skipped 25 test(s)\n',
    '2020-03-24T21:03:48.687Z workers [0iucw] Sandbox is responsive, closing it\n',
    '2020-03-24T21:03:49.274Z workers [2omqm] Run 169 test(s), skipped 3 test(s)\n',
    '2020-03-24T21:03:49.275Z workers [2omqm] Sandbox is responsive, closing it\n',
    '2020-03-24T21:03:49.275Z workers Merging parallel test run results\n',
    '2020-03-24T21:03:51.350Z project Test run finished\n',
    '2020-03-24T21:03:51.362Z project Processed console.log entries\n',
    '2020-03-24T21:03:51.365Z project Processed loading sequences\n',
    '2020-03-24T21:03:51.389Z project Test name duplicate: should wrap lis without UL/OL parent into ul\n',
    '2020-03-24T21:03:51.445Z project Test name duplicate: style value should take precedence over tag value\n',
    '2020-03-24T21:03:51.445Z project Processed executed tests\n',
    '2020-03-24T21:03:52.717Z project Processed code coverage\n',
    '2020-03-24T21:03:57.662Z project Test run result processed and sent to IDE\n'
  ]
}
smcenlly commented 4 years ago

Could you able to provide us with your webpack.config.js file and public (non-proprietary) package.json dependencies and devDependencies?

If you don't want to post this information publicly, could you please email it to hello@wallabyjs.com?

jljorgenson18 commented 4 years ago

I can't provide the entire Webpack config but here are the relevant bits

const urlLoaderCfg = {
    loader: 'url-loader',
    options: {
        limit: 2048, // 2kb
        fallback: 'file-loader',
        name: 'images/[name].[hash].[ext]'
    }
};

...

// In module.rules
            {
                test: /\.(jpe?g|png|gif|pdf|enex|xbm)$/,
                use: urlLoaderCfg
            }

And the devDependencies (minus @types modules)

    "autoprefixer": "^9.7.4",
    "babel-eslint": "^10.1.0",
    "babel-loader": "^8.0.6",
    "babel-plugin-istanbul": "^6.0.0",
    "babel-plugin-lodash": "^3.3.4",
    "babel-plugin-rewire": "^1.2.0",
    "case-sensitive-paths-webpack-plugin": "^2.3.0",
    "chai": "^4.2.0",
    "chalk": "^3.0.0",
    "clean-webpack-plugin": "^3.0.0",
    "closure-loader": "^0.9.2",
    "command-line-args": "^5.1.1",
    "copy-webpack-plugin": "^5.1.1",
    "cross-env": "^7.0.2",
    "css-loader": "^3.4.2",
    "d3-array": "^2.4.0",
    "detect-browser": "^4.8.0",
    "enzyme": "^3.11.0",
    "enzyme-adapter-react-16": "^1.15.2",
    "eslint": "^6.8.0",
    "eslint-config-airbnb-base": "^14.0.0",
    "eslint-config-prettier": "^6.10.0",
    "eslint-plugin-chai-friendly": "^0.5.0",
    "eslint-plugin-import": "^2.20.1",
    "eslint-plugin-jsx-a11y": "^6.2.3",
    "eslint-plugin-mocha": "^6.3.0",
    "eslint-plugin-prettier": "^3.1.2",
    "eslint-plugin-react": "^7.18.3",
    "eslint-plugin-react-hooks": "^2.5.0",
    "exports-loader": "^0.7.0",
    "file-loader": "^5.1.0",
    "html-webpack-plugin": "^3.2.0",
    "imagemin-webpack-plugin": "^2.4.2",
    "imports-loader": "^0.8.0",
    "ip": "^1.1.5",
    "karma": "^4.4.1",
    "karma-chrome-launcher": "^3.1.0",
    "karma-coverage": "^2.0.1",
    "karma-edge-launcher": "^0.4.2",
    "karma-firefox-launcher": "^1.3.0",
    "karma-ios-simulator-launcher": "0.0.4",
    "karma-junit-reporter": "^2.0.1",
    "karma-mocha": "^1.3.0",
    "karma-parallel": "^0.3.1",
    "karma-safari-private-launcher": "^1.0.0",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-spec-reporter": "0.0.32",
    "karma-webpack": "^4.0.2",
    "less": "^3.11.1",
    "less-loader": "^5.0.0",
    "mini-css-extract-plugin": "^0.9.0",
    "mocha": "^7.1.0",
    "node-noop": "^1.0.0",
    "node-sass": "^4.13.1",
    "optimize-css-assets-webpack-plugin": "^5.0.3",
    "parse5": "^5.1.1",
    "postcss-loader": "^3.0.0",
    "prettier": "^1.19.1",
    "puppeteer": "^2.1.1",
    "react-test-renderer": "^16.12.0",
    "sass-loader": "^8.0.2",
    "sinon": "^9.0.1",
    "style-loader": "^1.1.3",
    "svg-sprite-loader": "^4.2.1",
    "terser-webpack-plugin": "^2.3.5",
    "typescript": "^3.8.3",
    "url-loader": "^3.0.0",
    "webpack": "^4.41.6",
    "webpack-bundle-analyzer": "^3.6.1",
    "webpack-cli": "^3.3.11",
    "webpack-dev-server": "^3.10.3",
    "worker-loader": "^2.0.0",
    "xregexp": "^4.3.0"
smcenlly commented 4 years ago

Thanks - can you please provide dependencies as well (minus anything proprietary)?

jljorgenson18 commented 4 years ago

@smcenlly I would rather not. There is nothing in dependencies that should affect anything happening here. We could theoretically remove all dependencies and it wouldn't affect the tests since this is just a Webpack file loading problem.

jljorgenson18 commented 4 years ago

Also I should have added, but this is how we are loading the file

import blackRectangle from 'tests/images/black-rectangle.png';
smcenlly commented 4 years ago

Thanks - we'll set up a project with the details that you've sent us and try replicate your problem.

jljorgenson18 commented 4 years ago

Thank you!

I can email more information if needed by the way, it's just that the dependencies are mostly internal packages and React/Redux stuff. None of it is used with our build system.

smcenlly commented 4 years ago

We can replicate the problem. Will reply when we work out what's going on/wrong.

jljorgenson18 commented 4 years ago

@smcenlly Thank you! Please let me know if I can help.

smcenlly commented 4 years ago

Thanks for reporting the problem. Wallaby adds its own loaders to perform some pre/post instrumentation processing of your files. Our loaders weren't marked as raw, which means that when using Wallaby, all file content was being converted to a UTF8 string, regardless of whether it was a binary file or not. This has been fixed in the latest version of Wallaby, v1.0.871. Wallaby will automatically update for you with this fix within 20-30 minutes. If you want to update immediately, you may run the VS Code command Wallaby.js: Force Core Update.

jljorgenson18 commented 4 years ago

Thank you so much. That is pretty interesting and I'll give it a shot tomorrow.