Closed kaminskypavel closed 5 years ago
first of all, @ArtemGovorov thanks for taking the time to maintain the tool , I enjoy it alot ❤.
Thanks!
I really wished the new auto-config would work "out of the box" for monorepos as well
Auto-config should work for monorepos. If you can run npx jest
from your project's root, Wallaby auto-config should be able to do it too. What issues/errors do you get when using auto-config Run Configuration?
thanks for the reply.
running npx jest
yields the following output
> Test Suites: 11 failed, 27 passed, 38 total
> Tests: 7 failed, 293 passed, 300 total
> Snapshots: 50 passed, 50 total
> Time: 51.223s
> Ran all test suites.
running wallaby with a fully automatic config:
> Test run failure: not opened
Test run failure: not opened
Could you please paste the full output from the Wallaby Console tab?
Also, please try the following:
it('should work', () => {
})
content, and run Wallaby auto-config from the project's root, and let us know the results.
looks like it is one of my tests that break wallaby.
First I've removed all the test from all the packages to check whether wallaby is ok with this. Then I've introduced the tests back package by package.
I didn't look into why the specific test broke wallaby , but wanted to update that it looks like its alive and well!
@ArtemGovorov should I close the issue? or would you like me to come back and report later?
@kaminskypavel, I'll close the issue for now. If you have the problem again you may re-open this issue or else create a new one.
Hello @smcenlly and @ArtemGovorov , I faced the problem (Test run failure: not opened
) today with the latest Wallaby JS version for today.
The test:
import * as $$ from 'rxjs';
import { Subscription } from 'rxjs';
describe('', () => {
let sub: Subscription;
afterEach(() => {
// sub?.unsubscribe();
});
it.only('description ...', () => {
let val = 1;
sub = $$.timer(100).subscribe(() => val++);
expect(val).toBe(2);
});
});
Below I attached all possible logs. And also, I describe this problem with all details that I found in the 8 min video: https://www.youtube.com/watch?v=Sz8TlUqIywI
OS: Mac OS 10.15.4 (19E287) with the case-sensitive file system.
Diagnostic Report
{
editorVersion: 'WebStorm 2020.1.2',
pluginVersion: '1.0.178',
editorType: 'IntelliJ',
osVersion: 'darwin 19.4.0',
nodeVersion: 'v14.4.0',
coreVersion: '1.0.918',
config: {
trace: true,
diagnostics: {
jest: {
config: {
configs: [
{
automock: false,
cache: true,
cacheDirectory: '/private/var/folders/gt/zdw6dc0s1659dq263xkd3n8h0000gn/T/jest_dx',
clearMocks: false,
coveragePathIgnorePatterns: [ '/node_modules/' ],
cwd: '<rootDir>',
dependencyExtractor: undefined,
detectLeaks: undefined,
detectOpenHandles: undefined,
displayName: undefined,
errorOnDeprecated: false,
extraGlobals: [],
filter: undefined,
forceCoverageMatch: [],
globalSetup: undefined,
globalTeardown: undefined,
globals: {},
haste: { computeSha1: false, throwOnModuleCollision: false },
moduleDirectories: [ 'node_modules' ],
moduleFileExtensions: [ 'js', 'json', 'ts' ],
moduleLoader: undefined,
moduleNameMapper: [
[ '@app/main(.*)', '<rootDir>/apps/main/src$1' ],
[ '@configs(.*)', '<rootDir>/src/configs$1' ],
[ '@lib/account(.*)', '<rootDir>/libs/account/src$1' ],
[ '@lib/common(.*)', '<rootDir>/libs/common/src$1' ],
[ '@lib/exchange(.*)', '<rootDir>/libs/exchange/src$1' ],
[ '@lib/exchange-net(.*)', '<rootDir>/libs/exchange-net/src$1' ],
[ '@lib/exchange-net-drivers(.*)', '<rootDir>/libs/exchange-net-drivers/src$1' ],
[ '@src(.*)', '<rootDir>/src$1' ]
],
modulePathIgnorePatterns: [],
modulePaths: undefined,
name: '4d6c65fa01b389970e106233d1ebb7a8',
prettierPath: 'prettier',
resetMocks: false,
resetModules: false,
resolver: undefined,
restoreMocks: false,
rootDir: '<rootDir>',
roots: [ '<rootDir>/apps', '<rootDir>/libs', '<rootDir>/src' ],
runner: 'jest-runner',
setupFiles: [ '<rootDir>/configs/jest-setup.ts' ],
setupFilesAfterEnv: [ '<rootDir>/node_modules/jest-extended/dist/index.js' ],
skipFilter: false,
skipNodeResolution: undefined,
snapshotResolver: undefined,
snapshotSerializers: [],
testEnvironment: '<rootDir>/node_modules/jest-environment-node/build/index.js',
testEnvironmentOptions: {},
testLocationInResults: false,
testMatch: [],
testPathIgnorePatterns: [ '/node_modules/' ],
testRegex: [ '\\.spec\\.ts$' ],
testRunner: '<rootDir>/node_modules/jest-jasmine2/build/index.js',
testURL: 'http://localhost',
timers: 'real',
transform: [ [ '^.+\\.(t|j)s$', '<rootDir>/node_modules/ts-jest/dist/index.js', {} ] ],
transformIgnorePatterns: [ '/node_modules/' ],
unmockedModulePathPatterns: undefined,
watchPathIgnorePatterns: []
}
],
globalConfig: {
bail: 0,
changedFilesWithAncestor: false,
changedSince: undefined,
collectCoverage: false,
collectCoverageFrom: [ '**/*.(t|j)s' ],
collectCoverageOnlyFrom: undefined,
coverageDirectory: '/code/z-brain/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: [],
replname: undefined,
reporters: undefined,
rootDir: '<rootDir>',
runTestsByPath: false,
silent: undefined,
skipFilter: false,
testFailureExitCode: 1,
testNamePattern: undefined,
testPathPattern: '',
testResultsProcessor: undefined,
testSequencer: '<rootDir>/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: [ 'apps', 'libs', 'src' ],
watchPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|/\\.cache/|/\\.idea/|/\\.vscode/|/\\.git/|/\\.gitlab/' ],
testPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|/\\.cache/|/\\.idea/|/\\.vscode/|/\\.git/|/\\.gitlab/' ],
testMatch: [],
testRegex: [ '\\.spec\\.ts$' ]
}
}
}
},
testFramework: { version: 'jest@24.8.0', configurator: 'jest@24.8.0', reporter: 'jest@24.8.0', starter: 'jest@24.8.0', autoDetected: true },
filesWithCoverageCalculated: [ '**/*.(t|j)s' ],
globalSetup: false,
micromatch: true,
files: [
{ pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true },
{
pattern: '\\./dist/|\\./build/|\\./coverage/|/\\.cache/|/\\.idea/|/\\.vscode/|/\\.git/|/\\.gitlab/',
regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\/\.cache\/|\/\.idea\/|\/\.vscode\/|\/\.git\/|\/\.gitlab\//,
ignore: true,
trigger: true,
load: true
},
{ pattern: 'apps/**', ignore: false, trigger: true, load: true, order: 1 },
{ pattern: 'libs/**', ignore: false, trigger: true, load: true, order: 2 },
{ pattern: 'src/**', ignore: false, trigger: true, load: true, order: 3 },
{ pattern: '\\.spec\\.ts$', regexp: /\.spec\.ts$/, 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/|/\\.cache/|/\\.idea/|/\\.vscode/|/\\.git/|/\\.gitlab/',
regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\/\.cache\/|\/\.idea\/|\/\.vscode\/|\/\.git\/|\/\.gitlab\//,
ignore: true,
trigger: true,
load: true,
test: true
},
{ pattern: '\\.spec\\.ts$', regexp: /\.spec\.ts$/, ignore: false, trigger: true, load: true, test: true, order: 4 }
],
filesWithNoCoverageCalculated: [],
runAllTestsInAffectedTestFile: false,
updateNoMoreThanOneSnapshotPerTestFileRun: 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: {},
env: { type: 'node', params: {}, runner: '<homeDir>/.nvm/versions/node/v14.4.0/bin/node', viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
reportUnhandledPromises: true,
slowTestThreshold: 75,
lowCoverageThreshold: 80,
loose: true,
configCode: 'auto.detect#-281731917'
},
packageJSON: {
dependencies: {
'@nestjs/common': '~7.1.0',
'@nestjs/core': '~7.1.0',
'@nestjs/platform-express': '~7.1.0',
'@nestjs/swagger': '~4.5.8',
'@nestjs/typeorm': '~7.0.1',
'@nestjsx/crud': '~4.6.2',
'@nestjsx/crud-typeorm': '~4.6.2',
'@z-brain/api-entity-ref': '1.0.6',
'@z-brain/rxjs-awaitable-observables': '~1.0.7',
'@z-brain/typeorm-postgres-camelcase-naming-strategy': '~1.0.17',
ccxt: '~1.29.9',
ccxws: '~0.33.1',
'class-transformer': '~0.2.3',
'class-validator': '~0.11.1',
dotenv: '~8.2.0',
express: '^4.0.0',
lodash: '~4.17.15',
'module-alias': '~2.2.2',
'nestjs-pino': '~1.1.3',
pg: '~8.2.0',
ping: '~0.2.3',
'pino-pretty': '~3.6.1',
pluralize: '~8.0.0',
'pusher-js': '~5.1.1',
ramda: '~0.27.0',
'reflect-metadata': '~0.1.13',
rimraf: '~3.0.1',
rxjs: '~6.5.5',
scripty: '~1.9.1',
'swagger-ui-express': '~4.1.4',
talib: '~1.1.3',
typeorm: '~0.2.24',
'utility-types': '~3.10.0',
ws: '~7.3.0',
yargs: '~15.3.1'
},
devDependencies: {
'@nestjs/cli': '~7.1.5',
'@nestjs/schematics': '~7.0.0',
'@nestjs/testing': '~7.1.0',
'@types/express': '~4.17.6',
'@types/jest': '~25.1.1',
'@types/lodash': '~4.14.152',
'@types/module-alias': '~2.0.0',
'@types/node': '~14.0.5',
'@types/pg': '~7.14.3',
'@types/ping': '~0.2.0',
'@types/pluralize': '~0.0.29',
'@types/ramda': '~0.27.4',
'@types/supertest': '~2.0.9',
'@types/ws': '~7.2.4',
'@types/yargs': '~15.0.4',
'@typescript-eslint/eslint-plugin': '~2.33.0',
'@typescript-eslint/parser': '~2.33.0',
'@z-brain/eslint-plugin-api-entity-ref': '^1.0.4',
eslint: '~7.0.0',
'eslint-config-airbnb-base': '~14.1.0',
'eslint-import-resolver-typescript': '~2.0.0',
'eslint-plugin-filenames': '~1.3.2',
'eslint-plugin-import': '~2.20.2',
'eslint-plugin-promise': '~4.2.1',
'eslint-plugin-unicorn': '~20.0.0',
husky: '~4.2.1',
jest: '~26.1.0',
'jest-extended': '~0.11.5',
'rxjs-marbles': '~6.0.1',
supertest: '~4.0.2',
'ts-jest': '~26.1.1',
'ts-loader': '~7.0.5',
'ts-node': '~8.10.2',
'tsc-watch': '~4.2.9',
typescript: '~3.9.5'
}
},
fs: { numberOfFiles: 289 },
debug: [
'2020-06-24T01:53:51.531Z angular/cli config Angular CLI not found.\n',
'2020-06-24T01:53:51.617Z jest/config Detected Jest.\n',
'2020-06-24T01:53:51.618Z jest/config Configured Jest.\n',
'2020-06-24T01:53:51.620Z project Wallaby Node version: v14.4.0\n',
'2020-06-24T01:53:51.620Z project Wallaby config: <rootDir>/auto.detect\n',
'2020-06-24T01:53:52.479Z project File cache: <homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/7c87d2d00d42d778\n',
'2020-06-24T01:53:52.488Z uiService Listening port 51235\n',
'2020-06-24T01:53:52.500Z workers Parallelism for initial run: 10, for regular run: 5\n',
'2020-06-24T01:53:52.500Z workers Starting run worker instance #0\n',
'2020-06-24T01:53:52.500Z workers Starting run worker instance #1\n',
'2020-06-24T01:53:52.501Z workers Starting run worker instance #2\n',
'2020-06-24T01:53:52.501Z workers Starting run worker instance #3\n',
'2020-06-24T01:53:52.501Z workers Starting run worker instance #4\n',
'2020-06-24T01:53:52.501Z workers Starting run worker instance #5\n',
'2020-06-24T01:53:52.501Z workers Starting run worker instance #6\n',
'2020-06-24T01:53:52.501Z workers Starting run worker instance #7\n',
'2020-06-24T01:53:52.501Z workers Starting run worker instance #8\n',
'2020-06-24T01:53:52.501Z workers Starting run worker instance #9\n',
'2020-06-24T01:53:52.502Z workers Web server is listening at 50202\n',
'2020-06-24T01:53:52.579Z project File cache requires some updates, waiting required files from IDE\n',
'2020-06-24T01:53:52.694Z project Stopping process pool\n',
'2020-06-24T01:53:52.704Z project Test run started; run priority: 3\n',
'2020-06-24T01:53:52.721Z project Running all tests\n',
'2020-06-24T01:53:52.731Z workers Starting test run, priority: 3\n',
'2020-06-24T01:53:52.754Z nodeRunner Starting sandbox [worker #0, session #9tuhq]\n',
'2020-06-24T01:53:52.756Z nodeRunner Preparing sandbox [worker #0, session #9tuhq]\n',
'2020-06-24T01:53:52.772Z workers Started run worker instance (delayed) #0\n',
'2020-06-24T01:53:52.773Z nodeRunner Prepared sandbox [worker #0, session #9tuhq]\n',
'2020-06-24T01:53:52.773Z workers [worker #0, session #9tuhq] Running tests in sandbox\n',
'2020-06-24T01:53:52.796Z workers Started run worker instance (delayed) #1\n',
'2020-06-24T01:53:52.799Z workers Started run worker instance (delayed) #2\n',
'2020-06-24T01:53:52.810Z workers Started run worker instance (delayed) #4\n',
'2020-06-24T01:53:52.815Z workers Started run worker instance (delayed) #3\n',
'2020-06-24T01:53:52.816Z workers Started run worker instance (delayed) #6\n',
'2020-06-24T01:53:52.822Z workers Started run worker instance (delayed) #5\n',
'2020-06-24T01:53:52.828Z workers Started run worker instance (delayed) #7\n',
'2020-06-24T01:53:52.857Z workers Started run worker instance (delayed) #8\n',
'2020-06-24T01:53:52.869Z workers Started run worker instance (delayed) #9\n',
'2020-06-24T01:53:57.082Z workers [9tuhq] Loaded unknown number of test(s)\n',
'2020-06-24T01:53:57.082Z workers [9tuhq] Test executed: description ...\n',
'2020-06-24T01:53:57.084Z workers [9tuhq] Run 1 test(s), skipped 0 test(s)\n',
'2020-06-24T01:53:57.086Z workers [9tuhq] Sandbox is responsive, closing it\n',
'2020-06-24T01:53:57.086Z project Test run finished\n',
'2020-06-24T01:53:57.087Z project Processed console.log entries\n',
'2020-06-24T01:53:57.087Z project Processed loading sequences\n',
'2020-06-24T01:53:57.087Z project Processed executed tests\n',
'2020-06-24T01:53:57.088Z project Processed code coverage\n',
'2020-06-24T01:53:57.117Z project Test run result processed and sent to IDE\n',
'2020-06-24T01:53:57.194Z workers Sandbox (inactive) [9tuhq] error: <rootDir>/node_modules/rxjs/internal/util/hostReportError.js:4\n' +
' setTimeout(function () { throw err; }, 0);\n' +
' ^\n' +
'\n' +
"TypeError: Cannot read property '289' of undefined\n",
'2020-06-24T02:00:45.976Z fs File changed in editor: libs/exchange-net-drivers/src/services/wallaby-bug-demo.spec.ts\n',
'2020-06-24T02:00:45.983Z project Test run started; run priority: 2\n',
'2020-06-24T02:00:45.983Z testTask Test files from affected: 1, from deleted or manually requested: 0, from recently changed: 0, from loaded by: 0, from failing: 0\n',
'2020-06-24T02:00:45.983Z testTask Running only selected or not excluded tests\n',
'2020-06-24T02:00:45.988Z workers Starting test run, priority: 2\n',
'2020-06-24T02:00:45.988Z nodeRunner Starting sandbox [worker #0, session #75z9s]\n',
'2020-06-24T02:00:45.988Z nodeRunner Preparing sandbox [worker #0, session #75z9s]\n',
'2020-06-24T02:00:45.988Z nodeRunner Prepared sandbox [worker #0, session #75z9s]\n',
'2020-06-24T02:00:45.988Z workers [worker #0, session #75z9s] Running tests in sandbox\n',
'2020-06-24T02:00:45.990Z project Test run finished\n',
'2020-06-24T02:00:51.210Z fs File changed: libs/exchange-net-drivers/src/services/wallaby-bug-demo.spec.ts\n',
'2020-06-24T02:00:51.211Z fs No changes detected for libs/exchange-net-drivers/src/services/wallaby-bug-demo.spec.ts\n',
'2020-06-24T02:00:51.211Z extended-core File was not changed, but file markers may need to be synced\n'
]
}
Wallaby JS Logs: (it looks like it different from the Diagnostic Report)
wallaby.js started
core v1.0.918
2020-06-24T01:53:51.530Z angular/cli config Detecting Angular CLI.
2020-06-24T01:53:51.531Z angular/cli config Angular CLI not found.
2020-06-24T01:53:51.535Z jest/config Detecting Jest.
2020-06-24T01:53:51.617Z jest/config Detected Jest.
2020-06-24T01:53:51.618Z jest/config Configured Jest.
2020-06-24T01:53:51.620Z project Wallaby Node version: v14.4.0
2020-06-24T01:53:51.620Z project Wallaby config: /code/z-brain/the-bot/auto.detect
2020-06-24T01:53:51.746Z fs File added: src/base-seed.ts
2020-06-24T01:53:51.747Z fs File added: src/ccxws.d.ts
2020-06-24T01:53:51.747Z fs File added: src/global.d.ts
2020-06-24T01:53:51.748Z fs File added: src/migration.utils.ts
2020-06-24T01:53:51.748Z fs File added: src/talib.d.ts
2020-06-24T01:53:51.761Z fs File added: src/configs/constants.ts
2020-06-24T01:53:51.762Z fs File added: src/configs/helpers.ts
2020-06-24T01:53:51.762Z fs File added: src/configs/ormconfig.ts
2020-06-24T01:53:51.762Z fs File added: src/configs/seed-generator.ts
2020-06-24T01:53:51.763Z fs File added: src/configs/seed-template.ts
... A lot of the same messages about adding all project files ...
2020-06-24T01:53:51.905Z fs File added: libs/exchange-net-drivers/src/drivers/binance/types/index.ts
2020-06-24T01:53:51.905Z fs File added: libs/exchange-net-drivers/src/drivers/binance/types/trade-raw.stuff.ts
2020-06-24T01:53:52.479Z project File cache: /Users/anton/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/7c87d2d00d42d778
2020-06-24T01:53:52.488Z uiService Listening port 51235
2020-06-24T01:53:52.500Z workers Parallelism for initial run: 10, for regular run: 5
2020-06-24T01:53:52.500Z workers Starting run worker instance #0
2020-06-24T01:53:52.500Z workers Starting run worker instance #1
2020-06-24T01:53:52.501Z workers Starting run worker instance #2
2020-06-24T01:53:52.501Z workers Starting run worker instance #3
2020-06-24T01:53:52.501Z workers Starting run worker instance #4
2020-06-24T01:53:52.501Z workers Starting run worker instance #5
2020-06-24T01:53:52.501Z workers Starting run worker instance #6
2020-06-24T01:53:52.501Z workers Starting run worker instance #7
2020-06-24T01:53:52.501Z workers Starting run worker instance #8
2020-06-24T01:53:52.501Z workers Starting run worker instance #9
2020-06-24T01:53:52.502Z workers Web server is listening at 50202
2020-06-24T01:53:52.579Z project File cache requires some updates, waiting required files from IDE
2020-06-24T01:53:52.614Z project File libs/exchange-net-drivers/src/services/wallaby-bug-demo.spec.ts changes are patches only: false
2020-06-24T01:53:52.644Z project File libs/exchange-net-drivers/src/services/wallaby-bug-demo.spec.ts is not instrumented by core
2020-06-24T01:53:52.691Z project File libs/exchange-net-drivers/src/services/wallaby-bug-demo.spec.ts changes saved, store ts: 1592963615548, change ts: 1592963632614
2020-06-24T01:53:52.694Z project Stopping process pool
2020-06-24T01:53:52.704Z project Test run started; run priority: 3
2020-06-24T01:53:52.721Z project Running all tests
2020-06-24T01:53:52.731Z workers Starting test run, priority: 3
2020-06-24T01:53:52.754Z nodeRunner Starting sandbox [worker #0, session #9tuhq]
2020-06-24T01:53:52.756Z nodeRunner Preparing sandbox [worker #0, session #9tuhq]
2020-06-24T01:53:52.772Z workers Started run worker instance (delayed) #0
2020-06-24T01:53:52.773Z nodeRunner Prepared sandbox [worker #0, session #9tuhq]
2020-06-24T01:53:52.773Z workers [worker #0, session #9tuhq] Running tests in sandbox
2020-06-24T01:53:52.796Z workers Started run worker instance (delayed) #1
2020-06-24T01:53:52.799Z workers Started run worker instance (delayed) #2
2020-06-24T01:53:52.810Z workers Started run worker instance (delayed) #4
2020-06-24T01:53:52.815Z workers Started run worker instance (delayed) #3
2020-06-24T01:53:52.816Z workers Started run worker instance (delayed) #6
2020-06-24T01:53:52.822Z workers Started run worker instance (delayed) #5
2020-06-24T01:53:52.828Z workers Started run worker instance (delayed) #7
2020-06-24T01:53:52.857Z workers Started run worker instance (delayed) #8
2020-06-24T01:53:52.869Z workers Started run worker instance (delayed) #9
2020-06-24T01:53:57.082Z workers [9tuhq] Loaded unknown number of test(s)
2020-06-24T01:53:57.082Z workers [9tuhq] Test executed: description ...
console.log: Jest: FAIL libs/exchange-net-drivers/src/services/wallaby-bug-demo.spec.ts
console.log: Jest: ● › description ...
expect(received).toBe(expected) // Object.is equality
Expected: 4
Received: 1
at Object.<anonymous> (libs/exchange-net-drivers/src/services/wallaby-bug-demo.spec.ts:18:41)
at Object.t.length.arguments.<computed> (../../../Users/anton/Library/Caches/JetBrains/WebStorm2020.1/wallaby/wallaby/runners/node/jest@24.8.0/jasmineInitializer.js:14:1839)
2020-06-24T01:53:57.084Z workers [9tuhq] Run 1 test(s), skipped 0 test(s)
2020-06-24T01:53:57.086Z workers [9tuhq] Sandbox is responsive, closing it
Finished executing 1 affected test(s) in 4.36 second(s)
2020-06-24T01:53:57.086Z project Test run finished
2020-06-24T01:53:57.087Z project Processed console.log entries
2020-06-24T01:53:57.087Z project Processed loading sequences
2020-06-24T01:53:57.087Z project Processed executed tests
2020-06-24T01:53:57.088Z project Processed code coverage
2020-06-24T01:53:57.117Z project Test run result processed and sent to IDE
2020-06-24T01:53:57.194Z workers Sandbox (inactive) [9tuhq] error: /code/z-brain/the-bot/node_modules/rxjs/internal/util/hostReportError.js:4
setTimeout(function () { throw err; }, 0);
^
TypeError: Cannot read property '289' of undefined
Runtime error: ./node_modules/rxjs/internal/util/hostReportError.js:4
setTimeout(function () { throw err; }, 0);
^
TypeError: Cannot read property '289' of undefined
at SafeSubscriber._next (./libs/exchange-net-drivers/src/services/wallaby-bug-demo.spec.ts:16:20)
at SafeSubscriber.__tryOrUnsub (./node_modules/rxjs/src/internal/Subscriber.ts:265:10)
at SafeSubscriber.next (./node_modules/rxjs/src/internal/Subscriber.ts:207:14)
at Subscriber._next (./node_modules/rxjs/src/internal/Subscriber.ts:139:22)
at Subscriber.next (./node_modules/rxjs/src/internal/Subscriber.ts:99:12)
at AsyncAction.dispatch (./node_modules/rxjs/src/internal/observable/timer.ts:91:14)
at AsyncAction._execute (./node_modules/rxjs/src/internal/scheduler/AsyncAction.ts:122:12)
at AsyncAction.execute (./node_modules/rxjs/src/internal/scheduler/AsyncAction.ts:97:24)
at AsyncScheduler.flush (./node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts:58:26)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
Diagnostics report has been successfully copied to clipboard.
@korniychuk Thanks for submitting the report and recording the video. In the video you've mentioned that the error is only reproducible in your repo, and you're ok to provide us an access to it to reproduce it. Can you please add me (@ArtemGovorov), and I'll clone it to have a look?
@korniychuk We have been able to reproduce the issue locally. It is a combination of 2 problems:
Test run failure: not opened
because: The second issue should anyway not ever be causing Jest/Wallaby to hang, so we have fixed the Jest's bug by applying a runtime patch in our integration in the latest core v1.0.919.
The second issue (resulting in TypeError: Cannot read property '...' of undefined
) is expected, because you have your subscription cleanup code commented out:
afterEach(() => {
// sub?.unsubscribe();
});
and your test dependency (rxjs specifically) when being run by Jest/Wallaby is trying to cleanup by timeout after the test is finished, hence the error.
After you get the latest version of Wallaby core, the second issue will not be causing any Test run failure: not opened
errors. anymore. It will still result in TypeError: Cannot read property '...' of undefined
console errors, but those should not affect your test results at all (and the error messages can be removed by uncommenting the line with subscription cleanup code).
If the fix doesn't help, please provide us with an access to your repo to reproduce the issue.
@ArtemGovorov Wow, great! Thanks a log for the fastest answer and internal investigation 💪 🚀 , you are a real rockstar! I'll update the core and check it tonight and come back to you with any results 🙂
@ArtemGovorov It works now, problem resolved with the latest core v1.0.919 🥇 👍 Thanks a lot! 🙏
Issue description or question
first of all, @ArtemGovorov thanks for taking the time to maintain the tool , I enjoy it alot ❤. I really wished the new auto-config would work "out of the box" for monorepos as well
Wallaby.js configuration file
Code editor or IDE name and version
Visual Studio Code v1.? WebStorm v? IntelliJ IDEA v? 2019.2 Atom v1.? Visual Studio v? Sublime Text v3 build ?
OS name and version
Windows 10 OSX Linux
wallaby version : core v1.0.711
Context : lernajs based project with 3 node packages which are hoisted. wallaby picks up the test only form the 1st package
the frustrating part is I can see some of the tests when I'm consoling wallaby const in the
setup
functions.