wallabyjs / public

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

How to setup Wallaby correctly for a mono repo? #2698

Closed hongbo-miao closed 3 years ago

hongbo-miao commented 3 years ago

First just want to say this tool is soooooo awesome! Thanks!

Issue description or question

My repo is at https://github.com/Hongbo-Miao/hongbomiao.com

It is a mono repo.

I am trying to use Wallaby in api which is a Node.js app first.

First try

My first try is at https://github.com/Hongbo-Miao/hongbomiao.com/pull/2370 it gives me error like

Cannot read property 'config' of undefined
    at Object.<anonymous> api/src/config.ts:8:1
    at Object.<anonymous> api/src/security/middlewares/helmetMiddleware.ts:4
    at Object.<anonymous> api/src/security/middlewares/helmetMiddleware.test.ts:3

ioredis_mock_1.default is not a constructor
    at Suite.<anonymous> api/src/security/middlewares/rateLimitMiddleware.test.ts:15:3
    at Object.<anonymous> api/src/security/middlewares/rateLimitMiddleware.test.ts:9:1

test is not defined
    at Suite.<anonymous> api/src/security/utils/attachCSPNonce.test.ts:3:1
    at Object.<anonymous> api/src/security/utils/attachCSPNonce.test.ts:3:1

I am using dotenv-flow for my api app, however, I set process.env.NODE_ENV = 'test'; in the beginning of wallaby.conf.js already.

Second try

My second try is at https://github.com/Hongbo-Miao/hongbomiao.com/tree/wallaby-api

I am moving wallaby.conf.js under /api folder, however, this won't let me use the open source license any more, so I am using a trial license.

But still it gives me same error.

How should I setup Wallaby for a mono repo? Thanks

Another question, should I only use one wallaby.js in the root folder? But then how can I give different settings for each app inside of each sub folder.

Any guide will be great. Thanks!

To reproduce, you can clone the repo and setup by npm run setup. To test api, you can can do cd api && npm run test.

Wallaby diagnostics report

Click to here expand Wallaby diagnostics report! ```js { editorVersion: 'IntelliJ IDEA 2021.1.1', pluginVersion: '1.0.216', editorType: 'IntelliJ', osVersion: 'darwin 20.3.0', nodeVersion: 'v14.16.0', coreVersion: '1.0.1067', checksum: 'YWQ5NDViZDYxYTg5NDRiOTRjNzFmNmVjYTRiMGJkYWUsMTYyMTkwMDgwMDAwMCwx', config: { files: [ { pattern: 'api/src/**/*.ts', ignore: false, trigger: true, load: true, instrument: true, order: 1 }, { pattern: 'api/src/**/*.test.ts', ignore: true, trigger: true, load: true, instrument: true } ], tests: [ { pattern: 'api/src/**/*.test.ts', ignore: false, trigger: true, load: true, test: true, order: 2 } ], env: { type: 'node', params: {}, runner: '/.nvm/versions/node/v14.16.0/bin/node', viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true }, preprocessors: { '**/*.js': [Function (anonymous)] }, diagnostics: {}, filesWithNoCoverageCalculated: [], runAllTestsInAffectedTestFile: false, updateNoMoreThanOneSnapshotPerTestFileRun: false, addModifiedTestFileToExclusiveTestRun: true, compilers: { '**/*.?(lit)coffee?(.md)': [Function (anonymous)] }, 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, mapConsoleMessagesStackTrace: false, extensions: {}, reportUnhandledPromises: true, testFramework: { version: 'mocha@2.1.0', configurator: 'mocha@2.1.0', reporter: 'mocha@2.1.0', starter: 'mocha@2.1.0' }, slowTestThreshold: 75, lowCoverageThreshold: 80, loose: undefined, symlinkNodeModules: undefined, configCode: 'module.exports = function (wallaby) {\n' + " process.env.NODE_ENV = 'test';\n" + ' return {\n' + " // files: ['web/src/**/*.ts', '!web/src/**/*.test.ts'],\n" + " // tests: ['web/src/**/*.test.ts'],\n" + '\n' + " files: ['api/src/**/*.ts', '!api/src/**/*.test.ts'],\n" + " tests: ['api/src/**/*.test.ts'],\n" + '\n' + ' // compilers: {\n' + " // '**/*.ts': wallaby.compilers.typeScript({ module: 'esnext' }),\n" + ' // },\n' + ' env: {\n' + " type: 'node',\n" + ' },\n' + ' preprocessors: {\n' + " // '**/*.ts': (file) =>\n" + " // require('babel-core').transform(file.content, {\n" + ' // sourceMap: true,\n' + ' // compact: false,\n' + ' // filename: file.path,\n' + ' // babelrc: true,\n' + ' // }),\n' + '\n' + " // '**/*.js': (file) =>\n" + " // require('@babel/core').transform(file.content, {\n" + ' // sourceMap: true,\n' + ' // compact: false,\n' + ' // filename: file.path,\n' + ' // babelrc: true,\n' + ' // }),\n' + '\n' + " // '**/*.ts': (file) =>\n" + " // require('@babel/core').transform(file.content, {\n" + ' // // sourceMap: true,\n' + ' // // compact: false,\n' + ' // filename: file.path,\n' + ' // presets: [\n' + ' // [\n' + " // '@babel/preset-env',\n" + ' // {\n' + ' // targets: {\n' + " // node: 'current',\n" + ' // },\n' + ' // },\n' + ' // ],\n' + " // '@babel/preset-typescript',\n" + ' // ],\n' + ' // }),\n' + '\n' + " '**/*.js': wallaby.compilers.babel({\n" + ' presets: [\n' + ' [\n' + " '@babel/preset-env',\n" + ' {\n' + ' targets: {\n' + " node: 'current',\n" + ' },\n' + ' },\n' + ' ],\n' + " '@babel/preset-typescript',\n" + ' ],\n' + ' }),\n' + ' },\n' + ' };\n' + '};\n' }, packageJSON: { dependencies: undefined, devDependencies: { '@babel/cli': '7.13.16', '@babel/core': '7.14.0', '@babel/preset-env': '7.14.1', '@babel/preset-typescript': '7.13.0', '@commitlint/cli': '12.1.1', '@commitlint/config-conventional': '12.1.1', '@commitlint/prompt-cli': '12.1.1', '@types/node': '14.14.44', '@typescript-eslint/eslint-plugin': '4.23.0', '@typescript-eslint/parser': '4.23.0', codecov: '3.8.2', commitizen: '4.2.4', 'cross-env': '7.0.3', 'dotenv-flow': '3.2.0', eslint: '7.26.0', 'eslint-config-airbnb': '18.2.1', 'eslint-config-airbnb-base': '14.2.1', 'eslint-config-prettier': '8.3.0', 'eslint-plugin-cypress': '2.11.3', 'eslint-plugin-import': '2.22.1', 'eslint-plugin-jest': '24.3.6', 'eslint-plugin-jest-dom': '3.9.0', 'eslint-plugin-jsx-a11y': '6.4.1', 'eslint-plugin-prettier': '3.4.0', 'eslint-plugin-react': '7.23.2', 'eslint-plugin-security': '1.4.0', 'eslint-plugin-testing-library': '4.2.1', husky: '6.0.0', jest: '26.6.3', 'lint-staged': '11.0.0', 'markdownlint-cli2': '0.1.3', nyc: '15.1.0', prettier: '2.3.0', 'prettier-plugin-solidity': '1.0.0-beta.10', solhint: '3.3.4', 'solhint-plugin-prettier': '0.0.5', stylelint: '13.13.1', 'stylelint-a11y': '1.2.3', 'stylelint-config-prettier': '8.0.2', 'stylelint-config-recess-order': '2.4.0', 'stylelint-config-standard': '22.0.0', 'stylelint-high-performance-animation': '1.5.2', 'stylelint-prettier': '1.2.0', typescript: '4.2.4' } }, fs: { numberOfFiles: 92 }, debug: [ '2021-05-10T22:45:01.735Z project Wallaby Node version: v14.16.0\n', '2021-05-10T22:45:01.735Z project Wallaby config: /Clouds/Git/hongbomiao.com/wallaby.conf.js\n', '2021-05-10T22:45:01.826Z project File cache: /Library/Caches/JetBrains/IntelliJIdea2021.1/wallaby/projects/2703cac0c196dab4\n', '2021-05-10T22:45:02.021Z uiService Listening port 51235\n', '2021-05-10T22:45:02.034Z project package.json file change detected, invalidating local cache\n', '2021-05-10T22:45:02.109Z workers Parallelism for initial run: 10, for regular run: 5\n', '2021-05-10T22:45:02.109Z workers Starting run worker instance #0\n', '2021-05-10T22:45:02.109Z workers Starting run worker instance #1\n', '2021-05-10T22:45:02.110Z workers Starting run worker instance #2\n', '2021-05-10T22:45:02.110Z workers Starting run worker instance #3\n', '2021-05-10T22:45:02.110Z workers Starting run worker instance #4\n', '2021-05-10T22:45:02.110Z workers Starting run worker instance #5\n', '2021-05-10T22:45:02.110Z workers Starting run worker instance #6\n', '2021-05-10T22:45:02.110Z workers Starting run worker instance #7\n', '2021-05-10T22:45:02.110Z workers Starting run worker instance #8\n', '2021-05-10T22:45:02.110Z workers Starting run worker instance #9\n', '2021-05-10T22:45:02.110Z workers Web server is listening at 56773\n', '2021-05-10T22:45:02.110Z project File cache requires some updates, waiting required files from IDE\n', '2021-05-10T22:45:02.922Z workers Started run worker instance (delayed) #0\n', '2021-05-10T22:45:02.922Z workers Started run worker instance (delayed) #2\n', '2021-05-10T22:45:02.924Z workers Started run worker instance (delayed) #3\n', '2021-05-10T22:45:02.931Z workers Started run worker instance (delayed) #1\n', '2021-05-10T22:45:02.932Z workers Started run worker instance (delayed) #6\n', '2021-05-10T22:45:02.961Z workers Started run worker instance (delayed) #5\n', '2021-05-10T22:45:02.963Z workers Started run worker instance (delayed) #8\n', '2021-05-10T22:45:02.965Z workers Started run worker instance (delayed) #7\n', '2021-05-10T22:45:02.970Z workers Started run worker instance (delayed) #9\n', '2021-05-10T22:45:02.973Z workers Started run worker instance (delayed) #4\n', '2021-05-10T22:45:04.503Z project Stopping process pool\n', '2021-05-10T22:45:04.504Z project Running postprocessor\n', '2021-05-10T22:45:04.514Z postprocessor New TypeScript language service is required\n', '2021-05-10T22:45:09.064Z project Postprocessor execution finished\n', '2021-05-10T22:45:09.064Z project Test run started; run priority: 3\n', '2021-05-10T22:45:09.065Z project Running all tests\n', '2021-05-10T22:45:09.068Z workers Starting test run, priority: 3\n', '2021-05-10T22:45:09.068Z workers Distributing tests between 10 workers\n', '2021-05-10T22:45:09.069Z workers Running tests in parallel\n', '2021-05-10T22:45:09.069Z nodeRunner Starting sandbox [worker #0, session #opzln]\n', '2021-05-10T22:45:09.069Z nodeRunner Starting sandbox [worker #1, session #kjxyy]\n', '2021-05-10T22:45:09.069Z nodeRunner Starting sandbox [worker #2, session #tt692]\n', '2021-05-10T22:45:09.069Z nodeRunner Starting sandbox [worker #3, session #awfg8]\n', '2021-05-10T22:45:09.069Z nodeRunner Starting sandbox [worker #4, session #4cfl5]\n', '2021-05-10T22:45:09.069Z nodeRunner Starting sandbox [worker #5, session #keeeu]\n', '2021-05-10T22:45:09.069Z nodeRunner Starting sandbox [worker #6, session #ct8pr]\n', '2021-05-10T22:45:09.069Z nodeRunner Preparing sandbox [worker #0, session #opzln]\n', '2021-05-10T22:45:09.069Z nodeRunner Preparing sandbox [worker #1, session #kjxyy]\n', '2021-05-10T22:45:09.069Z nodeRunner Preparing sandbox [worker #2, session #tt692]\n', '2021-05-10T22:45:09.069Z nodeRunner Preparing sandbox [worker #3, session #awfg8]\n', '2021-05-10T22:45:09.070Z nodeRunner Preparing sandbox [worker #4, session #4cfl5]\n', '2021-05-10T22:45:09.070Z nodeRunner Preparing sandbox [worker #5, session #keeeu]\n', '2021-05-10T22:45:09.070Z nodeRunner Preparing sandbox [worker #6, session #ct8pr]\n', '2021-05-10T22:45:09.070Z nodeRunner Prepared sandbox [worker #0, session #opzln]\n', '2021-05-10T22:45:09.070Z nodeRunner Prepared sandbox [worker #1, session #kjxyy]\n', '2021-05-10T22:45:09.070Z nodeRunner Prepared sandbox [worker #2, session #tt692]\n', '2021-05-10T22:45:09.070Z nodeRunner Prepared sandbox [worker #3, session #awfg8]\n', '2021-05-10T22:45:09.070Z nodeRunner Prepared sandbox [worker #4, session #4cfl5]\n', '2021-05-10T22:45:09.070Z nodeRunner Prepared sandbox [worker #5, session #keeeu]\n', '2021-05-10T22:45:09.070Z nodeRunner Prepared sandbox [worker #6, session #ct8pr]\n', '2021-05-10T22:45:09.070Z workers [worker #0, session #opzln] Running tests in sandbox\n', '2021-05-10T22:45:09.071Z workers [worker #1, session #kjxyy] Running tests in sandbox\n', '2021-05-10T22:45:09.071Z workers [worker #2, session #tt692] Running tests in sandbox\n', '2021-05-10T22:45:09.071Z workers [worker #3, session #awfg8] Running tests in sandbox\n', '2021-05-10T22:45:09.071Z workers [worker #4, session #4cfl5] Running tests in sandbox\n', '2021-05-10T22:45:09.072Z workers [worker #5, session #keeeu] Running tests in sandbox\n', '2021-05-10T22:45:09.072Z workers [worker #6, session #ct8pr] Running tests in sandbox\n', '2021-05-10T22:45:09.107Z workers Sandbox (active) [4cfl5] error: test is not defined\n', "2021-05-10T22:45:09.168Z workers Sandbox (active) [keeeu] error: Cannot read property 'config' of undefined\n", "2021-05-10T22:45:09.169Z workers Sandbox (active) [ct8pr] error: Cannot read property 'config' of undefined\n", "2021-05-10T22:45:09.204Z workers Sandbox (active) [opzln] error: Cannot read property 'config' of undefined\n", '2021-05-10T22:45:09.208Z workers [4cfl5] Run 0 test(s), skipped 0 test(s)\n', '2021-05-10T22:45:09.209Z workers [4cfl5] Sandbox is responsive, closing it\n', '2021-05-10T22:45:09.273Z workers [keeeu] Run 0 test(s), skipped 0 test(s)\n', '2021-05-10T22:45:09.273Z workers [ct8pr] Run 0 test(s), skipped 0 test(s)\n', '2021-05-10T22:45:09.276Z workers [keeeu] Sandbox is responsive, closing it\n', '2021-05-10T22:45:09.277Z workers [ct8pr] Sandbox is responsive, closing it\n', '2021-05-10T22:45:09.305Z workers [opzln] Run 0 test(s), skipped 0 test(s)\n', '2021-05-10T22:45:09.306Z workers [opzln] Sandbox is responsive, closing it\n', "2021-05-10T22:45:09.573Z workers Sandbox (active) [kjxyy] error: Cannot read property 'config' of undefined\n", "2021-05-10T22:45:09.605Z workers Sandbox (active) [tt692] error: Cannot read property 'config' of undefined\n", '2021-05-10T22:45:09.678Z workers [kjxyy] Run 0 test(s), skipped 0 test(s)\n', '2021-05-10T22:45:09.680Z workers [kjxyy] Sandbox is responsive, closing it\n', '2021-05-10T22:45:09.707Z workers [tt692] Run 0 test(s), skipped 0 test(s)\n', '2021-05-10T22:45:09.708Z workers [tt692] Sandbox is responsive, closing it\n', '2021-05-10T22:45:09.916Z workers Sandbox (active) [awfg8] error: ioredis_mock_1.default is not a constructor\n', '2021-05-10T22:45:10.021Z workers [awfg8] Run 0 test(s), skipped 0 test(s)\n', '2021-05-10T22:45:10.023Z workers [awfg8] Sandbox is responsive, closing it\n', '2021-05-10T22:45:10.024Z workers Merging parallel test run results\n', '2021-05-10T22:45:10.024Z project Test run finished\n', '2021-05-10T22:45:10.025Z project Processed console.log entries\n', '2021-05-10T22:45:10.025Z project Processed loading sequences\n', '2021-05-10T22:45:10.025Z project Processed executed tests\n', '2021-05-10T22:45:10.032Z project Processed code coverage\n', '2021-05-10T22:45:10.062Z project Test run result processed and sent to IDE\n' ] } ```
smcenlly commented 3 years ago

First just want to say this tool is soooooo awesome! Thanks!

Thanks!

And thanks for providing so much detail in your issue report 😀.


One important pre-requisite for running tests for all projects in a mono-repo is for your projects to all use the same test runner. It looks like this is true in your case as from what I can tell, all of your projects are using jest.

What you need to do is configure jest to run from your mono-repo root. For example, something like:

root/jest.config.js

module.exports = {
    projects: [
        '<rootDir>/api/',
        '<rootDir>/web/',
        '<rootDir>/mobile/',
    ],
}

Once jest is working from the commandline from your project root, you should be able to start Wallaby using Automatic Configuration on your project root and everything will work for you.

I'll close the issue out as this should solve your problem but if you run into problems, let us know and we'll re-open.

hongbo-miao commented 3 years ago

Hi @smcenlly thanks for the quick response.

I saw failed tests become like

Failed to read HOST.
    at api/src/reliability/utils/createCircuitBreaker.test.ts:1:1

Failed to read HOST.
    at api/src/security/middlewares/corsMiddleware.test.ts:1:1

Failed to read HOST.
    at api/src/security/middlewares/helmetMiddleware.test.ts:1:1

Unexpected token '.'
    at Object.<anonymous> web/src/shared/components/Image.test.tsx:3:1

Failed to read HOST.
    at api/src/shared/utils/isDevelopment.test.ts:1:1

Failed to read HOST.
    at api/src/shared/utils/isProduction.test.ts:1:1

Unexpected token '.'
    at Object.<anonymous> web/src/App/components/App.test.tsx:3:1

Unexpected token '.'
    at Object.<anonymous> web/src/App/components/Copyright.test.tsx:3:1

Unexpected token '<'
    at Object.<anonymous> web/src/App/components/Footer.test.tsx:3:1

It seems having two kinds of issues:

  1. Cannot parse tsx files in /web (create-react-app app).
  2. For Failed to read HOST in /api (Node.js app), I think it is because I am using dotenv-flow. To load .env.test, I need pass NODE_ENV=test for Node.js.

For second issue, I then tried to add

module.exports = function (wallaby) {
  process.env.NODE_ENV = 'test';
  return {
    autoDetect: true,
  };
};

and use custom config file like

image

However, it still gives exact same error. Any idea? Thanks

Click here to expand Wallaby diagnostics report! ```js { editorVersion: 'IntelliJ IDEA 2021.1.1', pluginVersion: '1.0.216', editorType: 'IntelliJ', osVersion: 'darwin 20.3.0', nodeVersion: 'v14.16.0', coreVersion: '1.0.1068', checksum: 'YWQ5NDViZDYxYTg5NDRiOTRjNzFmNmVjYTRiMGJkYWUsMTYyMTkwMDgwMDAwMCwx', config: { diagnostics: { jest: { config: { configs: [ { automock: false, cache: true, cacheDirectory: '/private/var/folders/3j/6bpmwdc16tjccjy0r6c24dymf4sftl/T/jest_7uoevn', clearMocks: false, coveragePathIgnorePatterns: [ '/node_modules/' ], cwd: '/Clouds/Git/hongbomiao.com', dependencyExtractor: undefined, detectLeaks: undefined, detectOpenHandles: undefined, displayName: undefined, errorOnDeprecated: false, extraGlobals: [], filter: undefined, forceCoverageMatch: [], globalSetup: undefined, globalTeardown: undefined, globals: {}, haste: { computeSha1: false, throwOnModuleCollision: false }, injectGlobals: true, moduleDirectories: [ 'node_modules' ], moduleFileExtensions: [ 'js', 'json', 'jsx', 'ts', 'tsx', 'node' ], moduleLoader: undefined, moduleNameMapper: [], modulePathIgnorePatterns: [], modulePaths: undefined, name: 'ddddd9da53aed54daddbfb22a2162388', prettierPath: 'prettier', resetMocks: false, resetModules: false, resolver: undefined, restoreMocks: false, rootDir: '/Clouds/Git/hongbomiao.com/api', roots: [ '/Clouds/Git/hongbomiao.com/api' ], runner: 'jest-runner', setupFiles: [], setupFilesAfterEnv: [], skipFilter: false, skipNodeResolution: undefined, slowTestThreshold: 5, snapshotResolver: undefined, snapshotSerializers: [], testEnvironment: '/Clouds/Git/hongbomiao.com/api/node_modules/jest-environment-node/build/index.js', testEnvironmentOptions: {}, testLocationInResults: false, testMatch: [ '**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)' ], testPathIgnorePatterns: [ '/Clouds/Git/hongbomiao.com/api/build' ], testRegex: [], testRunner: '/Clouds/Git/hongbomiao.com/node_modules/jest-jasmine2/build/index.js', testURL: 'http://localhost', timers: 'real', transform: [ [ '\\.[jt]sx?$', '/Clouds/Git/hongbomiao.com/node_modules/babel-jest/build/index.js', {} ] ], transformIgnorePatterns: [ '/node_modules/', '\\.pnp\\.[^\\/]+$' ], unmockedModulePathPatterns: undefined, watchPathIgnorePatterns: [] }, { automock: false, cache: true, cacheDirectory: '/private/var/folders/3j/6bpmwdc16tjccjy0r6c24dymf4sftl/T/jest_7uoevn', clearMocks: false, coveragePathIgnorePatterns: [ '.query.ts', '.story.tsx', '.type.ts', 'src/shared/libs/*', 'src/shared/utils/initSentry.ts' ], cwd: '/Clouds/Git/hongbomiao.com', dependencyExtractor: undefined, detectLeaks: undefined, detectOpenHandles: undefined, displayName: undefined, errorOnDeprecated: false, extraGlobals: [], filter: undefined, forceCoverageMatch: [], globalSetup: undefined, globalTeardown: undefined, globals: {}, haste: { computeSha1: false, throwOnModuleCollision: false }, injectGlobals: true, moduleDirectories: [ 'node_modules' ], moduleFileExtensions: [ 'js', 'json', 'jsx', 'ts', 'tsx', 'node' ], moduleLoader: undefined, moduleNameMapper: [], modulePathIgnorePatterns: [], modulePaths: undefined, name: '47900f858c79ab89342447835af86116', prettierPath: 'prettier', resetMocks: false, resetModules: false, resolver: undefined, restoreMocks: false, rootDir: '/Clouds/Git/hongbomiao.com/web', roots: [ '/Clouds/Git/hongbomiao.com/web' ], runner: 'jest-runner', setupFiles: [], setupFilesAfterEnv: [], skipFilter: false, skipNodeResolution: undefined, slowTestThreshold: 5, snapshotResolver: undefined, snapshotSerializers: [], testEnvironment: '/Clouds/Git/hongbomiao.com/web/node_modules/jest-environment-jsdom/build/index.js', testEnvironmentOptions: {}, testLocationInResults: false, testMatch: [ '**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)' ], testPathIgnorePatterns: [ '/node_modules/' ], testRegex: [], testRunner: '/Clouds/Git/hongbomiao.com/node_modules/jest-jasmine2/build/index.js', testURL: 'http://localhost', timers: 'real', transform: [ [ '\\.[jt]sx?$', '/Clouds/Git/hongbomiao.com/node_modules/babel-jest/build/index.js', {} ] ], transformIgnorePatterns: [ '/node_modules/', '\\.pnp\\.[^\\/]+$' ], unmockedModulePathPatterns: undefined, watchPathIgnorePatterns: [] }, { automock: false, cache: true, cacheDirectory: '/private/var/folders/3j/6bpmwdc16tjccjy0r6c24dymf4sftl/T/jest_7uoevn', clearMocks: false, coveragePathIgnorePatterns: [ '/node_modules/' ], cwd: '/Clouds/Git/hongbomiao.com', dependencyExtractor: undefined, detectLeaks: undefined, detectOpenHandles: undefined, displayName: undefined, errorOnDeprecated: false, extraGlobals: [], filter: undefined, forceCoverageMatch: [], globalSetup: undefined, globalTeardown: undefined, globals: {}, haste: { defaultPlatform: 'ios', platforms: [ 'android', 'ios', 'native' ] }, injectGlobals: true, moduleDirectories: [ 'node_modules' ], moduleFileExtensions: [ 'js', 'json', 'jsx', 'ts', 'tsx', 'node' ], moduleLoader: undefined, moduleNameMapper: [], modulePathIgnorePatterns: [], modulePaths: undefined, name: 'ce85d3c0fc045a969eeaaaede4a6fd28', prettierPath: 'prettier', resetMocks: false, resetModules: false, resolver: undefined, restoreMocks: false, rootDir: '/Clouds/Git/hongbomiao.com/mobile', roots: [ '/Clouds/Git/hongbomiao.com/mobile' ], runner: 'jest-runner', setupFiles: [ '/Clouds/Git/hongbomiao.com/mobile/node_modules/react-native/jest/setup.js', '/Clouds/Git/hongbomiao.com/mobile/node_modules/jest-expo/src/preset/setup.js' ], setupFilesAfterEnv: [], skipFilter: false, skipNodeResolution: undefined, slowTestThreshold: 5, snapshotResolver: undefined, snapshotSerializers: [], testEnvironment: '/Clouds/Git/hongbomiao.com/mobile/node_modules/jest-environment-node/build/index.js', testEnvironmentOptions: {}, testLocationInResults: false, testMatch: [ '**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)' ], testPathIgnorePatterns: [ '/node_modules/' ], testRegex: [], testRunner: '/Clouds/Git/hongbomiao.com/node_modules/jest-jasmine2/build/index.js', testURL: 'http://localhost', timers: 'real', transform: [ [ '^.+\\.(js|ts|tsx)$', '/Clouds/Git/hongbomiao.com/node_modules/babel-jest/build/index.js', {} ], [ '^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp|ttf|otf|m4v|mov|mp4|mpeg|mpg|webm|aac|aiff|caf|m4a|mp3|wav|html|pdf|obj)$', '/Clouds/Git/hongbomiao.com/mobile/node_modules/jest-expo/src/preset/assetFileTransformer.js', {} ] ], transformIgnorePatterns: [ 'node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|@sentry/.*)' ], unmockedModulePathPatterns: undefined, watchPathIgnorePatterns: [] } ], globalConfig: { bail: 0, changedFilesWithAncestor: false, changedSince: undefined, collectCoverage: false, collectCoverageFrom: [], collectCoverageOnlyFrom: undefined, coverageDirectory: '/Clouds/Git/hongbomiao.com/coverage', coverageProvider: 'babel', coverageReporters: [ 'json', 'text', 'lcov', 'clover' ], coverageThreshold: undefined, detectLeaks: undefined, detectOpenHandles: undefined, enabledTestsMap: undefined, errorOnDeprecated: false, expand: false, filter: undefined, findRelatedTests: false, forceExit: false, globalSetup: undefined, globalTeardown: undefined, json: false, lastCommit: false, listTests: undefined, logHeapUsage: false, maxConcurrency: 5, maxWorkers: 11, noSCM: undefined, noStackTrace: false, nonFlagArgs: undefined, notify: false, notifyMode: 'failure-change', onlyChanged: false, onlyFailures: false, outputFile: undefined, passWithNoTests: undefined, projects: [ '/Clouds/Git/hongbomiao.com/api', '/Clouds/Git/hongbomiao.com/web', '/Clouds/Git/hongbomiao.com/mobile' ], replname: undefined, reporters: undefined, rootDir: '/Clouds/Git/hongbomiao.com', runTestsByPath: false, silent: undefined, skipFilter: false, testFailureExitCode: 1, testNamePattern: undefined, testPathPattern: '', testResultsProcessor: undefined, testSequencer: '/Clouds/Git/hongbomiao.com/node_modules/@jest/test-sequencer/build/index.js', testTimeout: undefined, updateSnapshot: 'new', useStderr: false, verbose: undefined, watch: false, watchAll: false, watchPlugins: undefined, watchman: true }, hasDeprecationWarnings: false, wallaby: { roots: [ 'api', 'web', 'mobile' ], watchPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|/\\..+/', '\\./api/build' ], testPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|/\\..+/', '\\./api/build' ], testMatch: [ '**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)' ], testRegex: [] } } } }, filesWithCoverageCalculated: [], filesWithNoCoverageCalculated: [ /.query.ts/, /.story.tsx/, /.type.ts/, /src\/shared\/libs\/*/, /src\/shared\/utils\/initSentry.ts/ ], globalSetup: false, testFramework: { version: 'jest@24.8.0', configurator: 'jest@24.8.0', reporter: 'jest@24.8.0', starter: 'jest@24.8.0', autoDetected: true }, micromatch: true, files: [ { pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true }, { pattern: '\\./dist/|\\./build/|\\./coverage/|/\\..+/', regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\/\..+\//, ignore: true, trigger: true, load: true }, { pattern: '\\./api/build', regexp: /\.\/api\/build/, ignore: true, trigger: true, load: true }, { pattern: '**/**', ignore: false, trigger: true, load: true, order: 1 }, { pattern: 'api/**', ignore: false, trigger: true, load: true, order: 2 }, { pattern: 'web/**', ignore: false, trigger: true, load: true, order: 3 }, { pattern: 'mobile/**', ignore: false, trigger: true, load: true, order: 4 }, { pattern: 'api/**/__tests__/**/*.[jt]s?(x)', ignore: true, trigger: true, load: true }, { pattern: 'api/**/?(*.)+(spec|test).[tj]s?(x)', ignore: true, trigger: true, load: true }, { pattern: 'web/**/__tests__/**/*.[jt]s?(x)', ignore: true, trigger: true, load: true }, { pattern: 'web/**/?(*.)+(spec|test).[tj]s?(x)', ignore: true, trigger: true, load: true }, { pattern: 'mobile/**/__tests__/**/*.[jt]s?(x)', ignore: true, trigger: true, load: true }, { pattern: 'mobile/**/?(*.)+(spec|test).[tj]s?(x)', ignore: true, trigger: true, load: true } ], tests: [ { pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true, test: true }, { pattern: '\\./dist/|\\./build/|\\./coverage/|/\\..+/', regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\/\..+\//, ignore: true, trigger: true, load: true, test: true }, { pattern: '\\./api/build', regexp: /\.\/api\/build/, ignore: true, trigger: true, load: true, test: true }, { pattern: 'api/**/__tests__/**/*.[jt]s?(x)', ignore: false, trigger: true, load: true, test: true, order: 5 }, { pattern: 'api/**/?(*.)+(spec|test).[tj]s?(x)', ignore: false, trigger: true, load: true, test: true, order: 6 }, { pattern: 'web/**/__tests__/**/*.[jt]s?(x)', ignore: false, trigger: true, load: true, test: true, order: 7 }, { pattern: 'web/**/?(*.)+(spec|test).[tj]s?(x)', ignore: false, trigger: true, load: true, test: true, order: 8 }, { pattern: 'mobile/**/__tests__/**/*.[jt]s?(x)', ignore: false, trigger: true, load: true, test: true, order: 9 }, { pattern: 'mobile/**/?(*.)+(spec|test).[tj]s?(x)', ignore: false, trigger: true, load: true, test: true, order: 10 } ], runAllTestsInAffectedTestFile: false, updateNoMoreThanOneSnapshotPerTestFileRun: false, addModifiedTestFileToExclusiveTestRun: true, 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, mapConsoleMessagesStackTrace: false, extensions: {}, env: { type: 'node', params: {}, runner: '/.nvm/versions/node/v14.16.0/bin/node', viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true }, reportUnhandledPromises: true, slowTestThreshold: 75, lowCoverageThreshold: 80, loose: true, configCode: "module.exports = function (wallaby) {\n process.env.NODE_ENV = 'test';\n return {\n autoDetect: true,\n };\n};\n" }, packageJSON: { dependencies: undefined, devDependencies: { '@babel/preset-env': '7.14.1', '@babel/preset-react': '7.13.13', '@babel/preset-typescript': '7.13.0', '@commitlint/cli': '12.1.1', '@commitlint/config-conventional': '12.1.1', '@commitlint/prompt-cli': '12.1.1', '@types/node': '14.14.44', '@typescript-eslint/eslint-plugin': '4.23.0', '@typescript-eslint/parser': '4.23.0', codecov: '3.8.2', commitizen: '4.2.4', 'cross-env': '7.0.3', eslint: '7.26.0', 'eslint-config-airbnb': '18.2.1', 'eslint-config-airbnb-base': '14.2.1', 'eslint-config-prettier': '8.3.0', 'eslint-plugin-cypress': '2.11.3', 'eslint-plugin-import': '2.22.1', 'eslint-plugin-jest': '24.3.6', 'eslint-plugin-jest-dom': '3.9.0', 'eslint-plugin-jsx-a11y': '6.4.1', 'eslint-plugin-prettier': '3.4.0', 'eslint-plugin-react': '7.23.2', 'eslint-plugin-security': '1.4.0', 'eslint-plugin-testing-library': '4.2.1', husky: '6.0.0', jest: '26.6.3', 'lint-staged': '11.0.0', 'markdownlint-cli2': '0.1.3', nyc: '15.1.0', prettier: '2.3.0', 'prettier-plugin-solidity': '1.0.0-beta.10', solhint: '3.3.4', 'solhint-plugin-prettier': '0.0.5', stylelint: '13.13.1', 'stylelint-a11y': '1.2.3', 'stylelint-config-prettier': '8.0.2', 'stylelint-config-recess-order': '2.4.0', 'stylelint-config-standard': '22.0.0', 'stylelint-high-performance-animation': '1.5.2', 'stylelint-prettier': '1.2.0', typescript: '4.2.4' } }, fs: { numberOfFiles: 460 }, debug: [ '2021-05-12T17:45:21.904Z angular/cli config Angular CLI not found.\n', '2021-05-12T17:45:22.492Z jest/config Detected Jest.\n', '2021-05-12T17:45:22.493Z jest/config Configured Jest.\n', '2021-05-12T17:45:22.495Z project Wallaby Node version: v14.16.0\n', '2021-05-12T17:45:22.495Z project Wallaby config: /Clouds/Git/hongbomiao.com/wallaby.conf.js\n', '2021-05-12T17:45:23.884Z fs File system scan has finished by timeout\n', '2021-05-12T17:45:23.898Z project File cache: /Library/Caches/JetBrains/IntelliJIdea2021.1/wallaby/projects/2703cac0c196dab4\n', '2021-05-12T17:45:24.197Z uiService Listening port 51235\n', '2021-05-12T17:45:24.209Z project Config file change detected, invalidating local cache\n', '2021-05-12T17:45:24.331Z workers Parallelism for initial run: 10, for regular run: 5\n', '2021-05-12T17:45:24.331Z workers Starting run worker instance #0\n', '2021-05-12T17:45:24.331Z workers Starting run worker instance #1\n', '2021-05-12T17:45:24.331Z workers Starting run worker instance #2\n', '2021-05-12T17:45:24.331Z workers Starting run worker instance #3\n', '2021-05-12T17:45:24.331Z workers Starting run worker instance #4\n', '2021-05-12T17:45:24.331Z workers Starting run worker instance #5\n', '2021-05-12T17:45:24.332Z workers Starting run worker instance #6\n', '2021-05-12T17:45:24.332Z workers Starting run worker instance #7\n', '2021-05-12T17:45:24.332Z workers Starting run worker instance #8\n', '2021-05-12T17:45:24.332Z workers Starting run worker instance #9\n', '2021-05-12T17:45:24.332Z workers Web server is listening at 53773\n', '2021-05-12T17:45:24.332Z project File cache requires some updates, waiting required files from IDE\n', '2021-05-12T17:45:24.505Z project Stopping process pool\n', '2021-05-12T17:45:24.508Z project Test run started; run priority: 3\n', '2021-05-12T17:45:24.510Z project Running all tests\n', '2021-05-12T17:45:24.517Z workers Starting test run, priority: 3\n', '2021-05-12T17:45:24.517Z workers Distributing tests between 10 workers\n', '2021-05-12T17:45:24.518Z workers Running tests in parallel\n', '2021-05-12T17:45:24.518Z nodeRunner Starting sandbox [worker #0, session #5lq7g]\n', '2021-05-12T17:45:24.518Z nodeRunner Starting sandbox [worker #1, session #9yxru]\n', '2021-05-12T17:45:24.518Z nodeRunner Starting sandbox [worker #2, session #lwl2o]\n', '2021-05-12T17:45:24.518Z nodeRunner Starting sandbox [worker #3, session #rw9fd]\n', '2021-05-12T17:45:24.518Z nodeRunner Starting sandbox [worker #4, session #e14rm]\n', '2021-05-12T17:45:24.518Z nodeRunner Starting sandbox [worker #5, session #8yrdb]\n', '2021-05-12T17:45:24.518Z nodeRunner Starting sandbox [worker #6, session #wjrm5]\n', '2021-05-12T17:45:24.518Z nodeRunner Starting sandbox [worker #7, session #xanyy]\n', '2021-05-12T17:45:24.519Z nodeRunner Starting sandbox [worker #8, session #kv7v0]\n', '2021-05-12T17:45:24.519Z nodeRunner Starting sandbox [worker #9, session #ojpew]\n', '2021-05-12T17:45:24.519Z nodeRunner Preparing sandbox [worker #0, session #5lq7g]\n', '2021-05-12T17:45:24.519Z nodeRunner Preparing sandbox [worker #1, session #9yxru]\n', '2021-05-12T17:45:24.519Z nodeRunner Preparing sandbox [worker #2, session #lwl2o]\n', '2021-05-12T17:45:24.519Z nodeRunner Preparing sandbox [worker #3, session #rw9fd]\n', '2021-05-12T17:45:24.519Z nodeRunner Preparing sandbox [worker #4, session #e14rm]\n', '2021-05-12T17:45:24.519Z nodeRunner Preparing sandbox [worker #5, session #8yrdb]\n', '2021-05-12T17:45:24.519Z nodeRunner Preparing sandbox [worker #6, session #wjrm5]\n', '2021-05-12T17:45:24.519Z nodeRunner Preparing sandbox [worker #7, session #xanyy]\n', '2021-05-12T17:45:24.519Z nodeRunner Preparing sandbox [worker #8, session #kv7v0]\n', '2021-05-12T17:45:24.519Z nodeRunner Preparing sandbox [worker #9, session #ojpew]\n', '2021-05-12T17:45:24.699Z workers Started run worker instance (delayed) #0\n', '2021-05-12T17:45:24.700Z nodeRunner Prepared sandbox [worker #0, session #5lq7g]\n', '2021-05-12T17:45:24.701Z workers [worker #0, session #5lq7g] Running tests in sandbox\n', '2021-05-12T17:45:24.704Z workers Started run worker instance (delayed) #1\n', '2021-05-12T17:45:24.704Z nodeRunner Prepared sandbox [worker #1, session #9yxru]\n', '2021-05-12T17:45:24.704Z workers [worker #1, session #9yxru] Running tests in sandbox\n', '2021-05-12T17:45:24.706Z workers Started run worker instance (delayed) #2\n', '2021-05-12T17:45:24.706Z nodeRunner Prepared sandbox [worker #2, session #lwl2o]\n', '2021-05-12T17:45:24.706Z workers [worker #2, session #lwl2o] Running tests in sandbox\n', '2021-05-12T17:45:24.711Z workers Started run worker instance (delayed) #3\n', '2021-05-12T17:45:24.712Z nodeRunner Prepared sandbox [worker #3, session #rw9fd]\n', '2021-05-12T17:45:24.712Z workers [worker #3, session #rw9fd] Running tests in sandbox\n', '2021-05-12T17:45:24.720Z workers Started run worker instance (delayed) #5\n', '2021-05-12T17:45:24.721Z nodeRunner Prepared sandbox [worker #5, session #8yrdb]\n', '2021-05-12T17:45:24.721Z workers [worker #5, session #8yrdb] Running tests in sandbox\n', '2021-05-12T17:45:24.746Z workers Started run worker instance (delayed) #6\n', '2021-05-12T17:45:24.746Z nodeRunner Prepared sandbox [worker #6, session #wjrm5]\n', '2021-05-12T17:45:24.746Z workers [worker #6, session #wjrm5] Running tests in sandbox\n', '2021-05-12T17:45:24.748Z workers Started run worker instance (delayed) #4\n', '2021-05-12T17:45:24.748Z nodeRunner Prepared sandbox [worker #4, session #e14rm]\n', '2021-05-12T17:45:24.748Z workers [worker #4, session #e14rm] Running tests in sandbox\n', '2021-05-12T17:45:24.761Z workers Started run worker instance (delayed) #8\n', '2021-05-12T17:45:24.761Z nodeRunner Prepared sandbox [worker #8, session #kv7v0]\n', '2021-05-12T17:45:24.761Z workers [worker #8, session #kv7v0] Running tests in sandbox\n', '2021-05-12T17:45:24.767Z workers Started run worker instance (delayed) #9\n', '2021-05-12T17:45:24.767Z nodeRunner Prepared sandbox [worker #9, session #ojpew]\n', '2021-05-12T17:45:24.767Z workers [worker #9, session #ojpew] Running tests in sandbox\n', '2021-05-12T17:45:24.792Z workers Started run worker instance (delayed) #7\n', '2021-05-12T17:45:24.792Z nodeRunner Prepared sandbox [worker #7, session #xanyy]\n', '2021-05-12T17:45:24.792Z workers [worker #7, session #xanyy] Running tests in sandbox\n', '2021-05-12T17:45:26.503Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-285\n', '2021-05-12T17:45:26.503Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-286\n', '2021-05-12T17:45:26.503Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-288\n', '2021-05-12T17:45:26.503Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-287\n', '2021-05-12T17:45:26.503Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-289\n', '2021-05-12T17:45:26.503Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-290\n', '2021-05-12T17:45:26.503Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-291\n', '2021-05-12T17:45:26.503Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-292\n', '2021-05-12T17:45:26.503Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-293\n', '2021-05-12T17:45:26.503Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-294\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-295\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-296\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-297\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-298\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-299\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-300\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-302\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-301\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-303\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-304\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-305\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-306\n', '2021-05-12T17:45:26.504Z fs No metadata for added file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-307\n', '2021-05-12T17:45:26.602Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-296\n', '2021-05-12T17:45:26.602Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-296\n', '2021-05-12T17:45:26.602Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-295\n', '2021-05-12T17:45:26.602Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-295\n', '2021-05-12T17:45:26.602Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-294\n', '2021-05-12T17:45:26.602Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-294\n', '2021-05-12T17:45:26.602Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-293\n', '2021-05-12T17:45:26.602Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-293\n', '2021-05-12T17:45:26.602Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-292\n', '2021-05-12T17:45:26.602Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-292\n', '2021-05-12T17:45:26.602Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-291\n', '2021-05-12T17:45:26.602Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-291\n', '2021-05-12T17:45:26.602Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-290\n', '2021-05-12T17:45:26.602Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-290\n', '2021-05-12T17:45:26.602Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-289\n', '2021-05-12T17:45:26.602Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-289\n', '2021-05-12T17:45:26.602Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-287\n', '2021-05-12T17:45:26.602Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-287\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-288\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-288\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-286\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-286\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-285\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-285\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-307\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-307\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-306\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-306\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-305\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-305\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-304\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-304\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-303\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-303\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-301\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-301\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-302\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-302\n', '2021-05-12T17:45:26.603Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-300\n', '2021-05-12T17:45:26.603Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-300\n', '2021-05-12T17:45:26.604Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-299\n', '2021-05-12T17:45:26.604Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-299\n', '2021-05-12T17:45:26.604Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-298\n', '2021-05-12T17:45:26.604Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-298\n', '2021-05-12T17:45:26.604Z fs File deleted: .git/.watchman-cookie-LCNC02F10MAMD6R-795-297\n', '2021-05-12T17:45:26.604Z fs No metadata for deleted file found: .git/.watchman-cookie-LCNC02F10MAMD6R-795-297\n', '2021-05-12T17:45:32.543Z workers Scheduling Jest Test Run: 2021-05-12T17:45:26.657Z\n', '2021-05-12T17:45:32.550Z workers [e14rm] Loaded unknown number of test(s)\n', '2021-05-12T17:45:32.550Z workers [e14rm] Test executed: should attach nonce\n', "2021-05-12T17:45:32.555Z workers Sandbox (active) [e14rm] error: Unexpected token '.'\n", '2021-05-12T17:45:32.559Z workers [e14rm] Run 1 test(s), skipped 0 test(s)\n', '2021-05-12T17:45:32.560Z workers Jest Test Run Complete: 2021-05-12T17:45:32.541Z\n', '2021-05-12T17:45:32.561Z workers [e14rm] Sandbox is responsive, closing it\n', '2021-05-12T17:45:32.848Z workers Scheduling Jest Test Run: 2021-05-12T17:45:26.666Z\n', '2021-05-12T17:45:32.917Z workers [rw9fd] Loaded unknown number of test(s)\n', '2021-05-12T17:45:32.987Z workers Scheduling Jest Test Run: 2021-05-12T17:45:26.702Z\n', '2021-05-12T17:45:33.002Z workers Sandbox (active) [wjrm5] error: Failed to read HOST.\n', '2021-05-12T17:45:33.003Z workers [wjrm5] Run 0 test(s), skipped 0 test(s)\n', '2021-05-12T17:45:33.006Z workers Jest Test Run Complete: 2021-05-12T17:45:32.985Z\n', '2021-05-12T17:45:33.006Z workers [wjrm5] Sandbox is responsive, closing it\n', '2021-05-12T17:45:33.191Z workers Scheduling Jest Test Run: 2021-05-12T17:45:26.705Z\n', '2021-05-12T17:45:33.202Z workers Sandbox (active) [8yrdb] error: Failed to read HOST.\n', '2021-05-12T17:45:33.203Z workers [8yrdb] Run 0 test(s), skipped 0 test(s)\n', '2021-05-12T17:45:33.207Z workers Jest Test Run Complete: 2021-05-12T17:45:33.189Z\n', '2021-05-12T17:45:33.207Z workers [8yrdb] Sandbox is responsive, closing it\n', '2021-05-12T17:45:33.686Z workers Scheduling Jest Test Run: 2021-05-12T17:45:26.700Z\n', '2021-05-12T17:45:33.695Z workers Sandbox (active) [5lq7g] error: Failed to read HOST.\n', '2021-05-12T17:45:33.697Z workers [5lq7g] Run 0 test(s), skipped 0 test(s)\n', '2021-05-12T17:45:33.705Z workers Jest Test Run Complete: 2021-05-12T17:45:33.674Z\n', '2021-05-12T17:45:33.706Z workers [5lq7g] Sandbox is responsive, closing it\n', '2021-05-12T17:45:33.897Z workers Scheduling Jest Test Run: 2021-05-12T17:45:26.685Z\n', "2021-05-12T17:45:33.900Z workers Sandbox (active) [kv7v0] error: Unexpected token '.'\n", '2021-05-12T17:45:33.902Z workers [kv7v0] Run 0 test(s), skipped 0 test(s)\n', '2021-05-12T17:45:33.908Z workers Jest Test Run Complete: 2021-05-12T17:45:33.892Z\n', '2021-05-12T17:45:33.908Z workers [kv7v0] Sandbox is responsive, closing it\n', '2021-05-12T17:45:33.995Z workers Scheduling Jest Test Run: 2021-05-12T17:45:26.684Z\n', "2021-05-12T17:45:33.999Z workers Sandbox (active) [ojpew] error: Unexpected token '<'\n", '2021-05-12T17:45:34.001Z workers [ojpew] Run 0 test(s), skipped 0 test(s)\n', '2021-05-12T17:45:34.005Z workers Jest Test Run Complete: 2021-05-12T17:45:33.993Z\n', '2021-05-12T17:45:34.005Z workers [ojpew] Sandbox is responsive, closing it\n', '2021-05-12T17:45:34.165Z workers Scheduling Jest Test Run: 2021-05-12T17:45:26.702Z\n', "2021-05-12T17:45:34.169Z workers Sandbox (active) [xanyy] error: Unexpected token '.'\n", '2021-05-12T17:45:34.171Z workers [xanyy] Run 0 test(s), skipped 0 test(s)\n', '2021-05-12T17:45:34.173Z workers Jest Test Run Complete: 2021-05-12T17:45:34.164Z\n', '2021-05-12T17:45:34.173Z workers [xanyy] Sandbox is responsive, closing it\n', '2021-05-12T17:45:34.796Z workers [rw9fd] Test executed: should limit rate\n', '2021-05-12T17:45:34.799Z workers [rw9fd] Loaded unknown number of test(s)\n', '2021-05-12T17:45:34.799Z workers [rw9fd] Test executed: initial state\n', '2021-05-12T17:45:34.800Z workers [rw9fd] Test executed: handle QUERY_ME_SUCCEED\n', '2021-05-12T17:45:34.801Z workers [rw9fd] Run 3 test(s), skipped 0 test(s)\n', '2021-05-12T17:45:34.801Z workers Jest Test Run Complete: 2021-05-12T17:45:34.795Z\n', '2021-05-12T17:45:34.802Z workers [rw9fd] Sandbox is responsive, closing it\n', '2021-05-12T17:45:34.939Z workers Scheduling Jest Test Run: 2021-05-12T17:45:26.662Z\n', '2021-05-12T17:45:34.944Z workers Sandbox (active) [9yxru] error: Failed to read HOST.\n', '2021-05-12T17:45:34.945Z workers [9yxru] Run 0 test(s), skipped 0 test(s)\n', '2021-05-12T17:45:34.950Z workers Jest Test Run Complete: 2021-05-12T17:45:34.931Z\n', '2021-05-12T17:45:34.950Z workers [9yxru] Sandbox is responsive, closing it\n', '2021-05-12T17:45:35.895Z workers Scheduling Jest Test Run: 2021-05-12T17:45:26.707Z\n', '2021-05-12T17:45:35.903Z workers Sandbox (active) [lwl2o] error: Failed to read HOST.\n', '2021-05-12T17:45:35.904Z workers [lwl2o] Run 0 test(s), skipped 0 test(s)\n', '2021-05-12T17:45:35.911Z workers Jest Test Run Complete: 2021-05-12T17:45:35.887Z\n', '2021-05-12T17:45:35.911Z workers [lwl2o] Sandbox is responsive, closing it\n', '2021-05-12T17:45:35.912Z workers Merging parallel test run results\n', '2021-05-12T17:45:35.913Z project Test run finished\n', '2021-05-12T17:45:35.913Z project Processed console.log entries\n', '2021-05-12T17:45:35.913Z project Processed loading sequences\n', '2021-05-12T17:45:35.914Z project Processed executed tests\n', '2021-05-12T17:45:35.918Z project Processed code coverage\n', '2021-05-12T17:45:35.944Z project Test run result processed and sent to IDE\n' ] } ```
smcenlly commented 3 years ago

Can you please confirm that you have first ensured that npx jest is working outside of Wallaby from your project root?

This is the first step that you need to take and is unrelated to Wallaby. For Wallaby to run your tests for your entire repo, Jest also has to be able to run your tests.

hongbo-miao commented 3 years ago

Oh I got same errors when I run npx jest directly in the root folder.

However, if I run npx jest individually in each folder, it gives me results:

Copy from previous comment: currently when I run Wallaby, I have errors from /web and /api:

Failed to read HOST.
    at api/src/reliability/utils/createCircuitBreaker.test.ts:1:1

Failed to read HOST.
    at api/src/security/middlewares/corsMiddleware.test.ts:1:1

Failed to read HOST.
    at api/src/security/middlewares/helmetMiddleware.test.ts:1:1

Unexpected token '.'
    at Object.<anonymous> web/src/shared/components/Image.test.tsx:3:1

Failed to read HOST.
    at api/src/shared/utils/isDevelopment.test.ts:1:1

Failed to read HOST.
    at api/src/shared/utils/isProduction.test.ts:1:1

Unexpected token '.'
    at Object.<anonymous> web/src/App/components/App.test.tsx:3:1

Unexpected token '.'
    at Object.<anonymous> web/src/App/components/Copyright.test.tsx:3:1

Unexpected token '<'
    at Object.<anonymous> web/src/App/components/Footer.test.tsx:3:1

Here are two following issues:

  1. For /web (create-react-app app), the test script is special (react-scripts test --watchAll=false), which kind of making sense to fail in Wallaby. Maybe I need some custom config for Wallaby?
  2. If I run npx jest directly in /api, it does succeed, however, this fails in Wallaby with automatic config.

The latest try is at https://github.com/Hongbo-Miao/hongbomiao.com/pull/2370

Will keep trying.

smcenlly commented 3 years ago

For /web (create-react-app app), the test script is special (react-scripts test --watchAll=false), which kind of making sense to fail in Wallaby. Maybe I need some custom config for Wallaby?

If running from a mono-repo, in order to make jest run from the command line for your mono-repo, you will need to have a jest.config for your react project. I'm not entirely sure how to do this without ejecting but you may find some advice on google, etc.

If I run npx jest directly in /api, it does succeed, however, this fails in Wallaby with automatic config.

Wallaby will also work for you if you run it directly on API. Please see the settings from the screenshot below to run on the API folder only. Configuration Type: Automatic, Root Path: <api folder>.

image


The key to getting this working is to get jest running from the CLI from your mono-repo root (completely separate to Wallaby). Then Wallaby will work for you too.

hongbo-miao commented 3 years ago

Thanks @smcenlly I will report back for what I found once I succeed! Close for now.