wallabyjs / public

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

Mocha instance is currently running tests, cannot start a next test run until this one is done  #2560

Closed tomitrescak closed 3 years ago

tomitrescak commented 3 years ago

Issue description or question

Hi, I am trying to use Mocha with Wallaby but I keep randomly getting following error: "Mocha instance is currently running tests, cannot start a next test run until this one is done"

Also, I tried to implement database initialisation with delayedStart and now I get this error on EVERY SECOND run. That is, once, all runs well, on second time I get this error.

Wallaby diagnostics report

{
  editorVersion: '1.50.1',
  pluginVersion: '1.0.248',
  editorType: 'VSCode',
  osVersion: 'win32 10.0.19041',
  nodeVersion: 'v12.16.2',
  coreVersion: '1.0.984',
  checksum: 'ZTY3MzlmZDgwZWY4ZmQ1NDNkMzk2MjliNWQxNTBlMGMsMTYwNzM4NTYwMDAwMCww',
  config: {
    files: [
      { pattern: 'src/**/*.ts', ignore: false, trigger: true, load: true, instrument: true, order: 1 },
      { pattern: 'src/**/*.tsx', ignore: false, trigger: true, load: true, instrument: true, order: 2 },
      { pattern: 'src/**/*.test.ts?(x)', ignore: true, trigger: true, load: true, instrument: true }
    ],
    tests: [ { pattern: 'src/**/*.test.ts?(x)', ignore: false, trigger: true, load: true, test: true, order: 3 } ],
    env: {
      type: 'node',
      NODE_ENV: 'test',
      BASE_URL: 'http://localhost:3000',
      params: {},
      runner: 'C:\\Program Files\\nodejs\\node.exe',
      viewportSize: { width: 800, height: 600 },
      options: { width: 800, height: 600 },
      bundle: true
    },
    testFramework: { version: 'mocha@2.1.0', configurator: 'mocha@2.1.0', reporter: 'mocha@2.1.0', starter: 'mocha@2.1.0' },
    compilers: { '**/*.ts?(x)': [Function], '**/*.?(lit)coffee?(.md)': [Function] },
    delays: { run: 1000, edit: 0, update: 0 },
    workers: { initial: 1, regular: 1, recycle: false },
    reportUnhandledPromises: true,
    teardown: "function (wallaby) {\r\n      // console.log(global.db);\r\n      // global.db.stop();\r\n      console.log('Database Teardown ..');\r\n      // global.jsdom();\r\n    }",
    diagnostics: {},
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    updateNoMoreThanOneSnapshotPerTestFileRun: false,
    preprocessors: {},
    maxConsoleMessagesPerTest: 100,
    autoConsoleLog: true,
    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: {},
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    loose: undefined,
    configCode: '// @ts-nocheck\r\n' +
      '// eslint-disable-next-line @typescript-eslint/no-var-requires\r\n' +
      "var path = require('path');\r\n" +
      '\r\n' +
      'module.exports = function (wallaby) {\r\n' +
      "  process.env.NODE_PATH += path.delimiter + path.join(wallaby.projectCacheDir, 'src');\r\n" +
      '\r\n' +
      '  return {\r\n' +
      "    files: ['src/**/*.ts', 'src/**/*.tsx', '!src/**/*.test.ts?(x)'],\r\n" +
      "    tests: ['src/**/*.test.ts?(x)'],\r\n" +
      '    env: {\r\n' +
      "      type: 'node',\r\n" +
      "      NODE_ENV: 'test',\r\n" +
      "      BASE_URL: 'http://localhost:3000'\r\n" +
      '    },\r\n' +
      "    testFramework: 'mocha',\r\n" +
      '    compilers: {\r\n' +
      "      '**/*.ts?(x)': wallaby.compilers.babel({\r\n" +
      "        presets: ['next/babel'],\r\n" +
      '        plugins: [\r\n' +
      "          ['@babel/plugin-proposal-decorators', { legacy: true }],\r\n" +
      "          ['@babel/plugin-proposal-class-properties', { loose: true }]\r\n" +
      '        ]\r\n' +
      '      })\r\n' +
      '    },\r\n' +
      '    delays: {\r\n' +
      '      run: 1000\r\n' +
      '    },\r\n' +
      '    workers: {\r\n' +
      '      initial: 1,\r\n' +
      '      regular: 1\r\n' +
      '    },\r\n' +
      '    reportUnhandledPromises: true,\r\n' +
      '    setup: function (wallaby) {\r\n' +
      '      wallaby.delayStart();\r\n' +
      '      var delayed = false;\r\n' +
      "      require.extensions['.css'] = () => {\r\n" +
      '        /* */\r\n' +
      '      };\r\n' +
      '\r\n' +
      '      if (!global.db) {\r\n' +
      '        delayed = true;\r\n' +
      "        console.log('Spinning new db');\r\n" +
      "        require('apollo-connector-mongodb/dist/testing')\r\n" +
      '          .getDb()\r\n' +
      '          .then(db => {\r\n' +
      "            console.log('Started new database instance!');\r\n" +
      '            global.db = db;\r\n' +
      '            wallaby.start();\r\n' +
      '          });\r\n' +
      "        console.log('Starting new database instance!');\r\n" +
      '      }\r\n' +
      '\r\n' +
      '      if (!global.document) {\r\n' +
      '        // eslint-disable-next-line @typescript-eslint/no-var-requires\r\n' +
      "        global.jsdom = require('jsdom-global')(undefined, {\r\n" +
      "          url: 'http://localhost'\r\n" +
      '        });\r\n' +
      '      }\r\n' +
      '\r\n' +
      '      const mocha = wallaby.testFramework;\r\n' +
      "      mocha.suite.on('pre-require', function () {\r\n" +
      "        require(wallaby.projectCacheDir + '/src/mocha.config');\r\n" +
      '\r\n' +
      "        const cleanup = require('@testing-library/react').cleanup;\r\n" +
      '        afterEach(cleanup);\r\n' +
      '      });\r\n' +
      '\r\n' +
      '      if (!delayed) {\r\n' +
      '        wallaby.start();\r\n' +
      '      }\r\n' +
      '    },\r\n' +
      '    teardown: function (wallaby) {\r\n' +
      '      // console.log(global.db);\r\n' +
      '      // global.db.stop();\r\n' +
      "      console.log('Database Teardown ..');\r\n" +
      '      // global.jsdom();\r\n' +
      '    }\r\n' +
      '  };\r\n' +
      '};\r\n'
  },
  packageJSON: {
    dependencies: {
      '@apollo/client': '^3.2.5',
      '@emotion/core': '^10.0.35',
      '@emotion/styled': '^10.0.27',
      '@loadable/component': '^5.14.1',
      '@pika/react': '^16.13.1',
      '@pika/react-dom': '^16.13.1',
      classnames: '^2.2.6',
      'date-fns': '^2.16.1',
      graphql: '^15.4.0',
      'js-beautify': '^1.13.0',
      lodash: '^4.17.20',
      marked: '^1.2.2',
      mobx: '^6.0.1',
      'mobx-react': '^7.0.0',
      'react-alert': '^7.0.2',
      'react-alert-template-basic': '^1.0.0',
      'react-datepicker': '^3.3.0',
      'react-helmet': '^6.1.0',
      'semantic-ui-react': '^2.0.1',
      sweetalert2: '^10.9.0'
    },
    devDependencies: {
      '@babel/core': '^7.12.3',
      '@babel/plugin-proposal-class-properties': '^7.12.1',
      '@babel/plugin-proposal-decorators': '^7.12.1',
      '@babel/register': '^7.12.1',
      '@graphql-codegen/cli': '^1.19.0',
      '@graphql-codegen/typescript': '^1.17.11',
      '@graphql-codegen/typescript-operations': '^1.17.8',
      '@graphql-codegen/typescript-react-apollo': '^2.0.7',
      '@graphql-codegen/typescript-resolvers': '^1.17.10',
      '@testing-library/jest-dom': '^5.11.5',
      '@testing-library/react': '^11.1.0',
      '@types/bcryptjs': '^2.4.2',
      '@types/classnames': '^2.2.11',
      '@types/lodash': '^4.14.164',
      '@types/mocha': '^8.0.3',
      '@types/mongodb': '^3.5.32',
      '@types/node': '^14.14.5',
      '@types/nodemailer': '^6.4.0',
      '@types/react': '^16.9.54',
      '@types/react-alert': '^5.2.0',
      '@types/react-datepicker': '^3.1.1',
      '@types/react-helmet': '^6.1.0',
      '@types/react-router-dom': '^5.1.6',
      '@types/sinon': '^9.0.8',
      '@typescript-eslint/eslint-plugin': '^4.6.0',
      '@typescript-eslint/parser': '^4.6.0',
      'apollo-connector-mongodb': '^3.0.5',
      'apollo-link-token-refresh': '^0.3.2',
      'apollo-server-micro': '^2.18.2',
      'babel-loader': '^8.1.0',
      'babel-plugin-jsx-control-statements': '^4.1.0',
      bcryptjs: '^2.4.3',
      cors: '^2.8.5',
      eslint: '^7.12.1',
      'eslint-config-prettier': '^6.15.0',
      'eslint-plugin-jsx-a11y': '^6.4.1',
      'eslint-plugin-prettier': '^3.1.4',
      'eslint-plugin-react-hooks': '^4.2.0',
      expect: '^26.6.1',
      'graphql-tools': '^7.0.1',
      'jest-sinon': '^1.0.4',
      jsdom: '^16.4.0',
      'jsdom-global': '^3.0.2',
      jsonwebtoken: '^8.5.1',
      'meteor-random': '^0.0.3',
      'meteor-sha256': '^1.0.1',
      mocha: '^8.2.0',
      'mongodb-memory-server': '^6.9.2',
      next: '^10.0.0',
      nodemailer: '^6.4.14',
      prettier: '^2.1.2',
      react: '17.0.1',
      'react-dom': '17.0.1',
      'semantic-ui-css': '^2.4.1',
      sinon: '^9.2.0',
      'tsconfig-paths-webpack-plugin': '^3.3.0',
      tslib: '^2.0.3',
      typescript: '^4.0.5',
      vite: '^1.0.0-rc.9',
      'vite-plugin-react': '^3.0.2',
      'vite-tsconfig-paths': '^1.1.0'
    }
  },
  fs: { numberOfFiles: 112 },
  debug: [
    '2020-11-08T22:49:46.236Z project Wallaby Node version: v12.16.2\n',
    '2020-11-08T22:49:46.236Z project Wallaby config: C:\\Users\\tomi\\Projects\\Github\\clara\\wallaby.js\n',
    '2020-11-08T22:49:47.030Z project File cache: C:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\projects\\429f72f2c69c4b44\n',
    '2020-11-08T22:49:47.085Z uiService Listening port 51235\n',
    '2020-11-08T22:49:47.111Z project Config file change detected, invalidating local cache\n',
    '2020-11-08T22:49:47.146Z workers Parallelism for initial run: 1, for regular run: 1\n',
    '2020-11-08T22:49:47.146Z workers Starting run worker instance #0\n',
    '2020-11-08T22:49:47.147Z workers Web server is listening at 51193\n',
    '2020-11-08T22:49:47.147Z project File cache requires some updates, waiting required files from IDE\n',
    '2020-11-08T22:49:47.360Z uiService UI client connected\n',
    '2020-11-08T22:49:47.361Z uiService Outgoing message ui:handshake\n',
    '2020-11-08T22:49:47.436Z workers Started run worker instance (delayed) #0\n',
    '2020-11-08T22:49:48.797Z uiService Incoming message ui:start\n',
    '2020-11-08T22:49:48.798Z uiService Outgoing message ui:summary\n',
    '2020-11-08T22:49:48.801Z uiService Outgoing message ui:files\n',
    '2020-11-08T22:49:48.815Z uiService Incoming message ui:closedInEditor\n',
    '2020-11-08T22:49:48.816Z uiService Incoming message ui:codeRequested\n',
    '2020-11-08T22:49:51.164Z project Compiler did not set ranges for file [src/server/environment.d.ts]\n',
    '2020-11-08T22:49:51.246Z project Compiler did not set ranges for file [src/pages/stories.tsx]\n',
    '2020-11-08T22:49:51.281Z project Compiler did not set ranges for file [src/components/Accounts/shared.ts]\n',
    '2020-11-08T22:49:51.586Z project Compiler did not set ranges for file [src/components/tests/UsersView.test.tsx]\n',
    '2020-11-08T22:49:51.968Z project Compiler did not set ranges for file [src/components/Form/tests/Checkbox.tests.ts]\n',
    '2020-11-08T22:49:52.015Z project Compiler did not set ranges for file [src/components/Form/library/types.ts]\n',
    '2020-11-08T22:49:52.359Z project Compiler did not set ranges for file [src/components/Form/index.ts]\n',
    '2020-11-08T22:49:52.695Z project Compiler did not set ranges for file [src/server/library/resolverTypes.ts]\n',
    '2020-11-08T22:49:54.143Z project Stopping process pool\n',
    '2020-11-08T22:49:54.145Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:49:55.155Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:49:55.155Z project Test run started; run priority: 3\n',
    '2020-11-08T22:49:55.156Z project Running all tests\n',
    '2020-11-08T22:49:55.158Z workers Starting test run, priority: 3\n',
    '2020-11-08T22:49:55.158Z nodeRunner Starting sandbox [worker #0, session #yk79j]\n',
    '2020-11-08T22:49:55.158Z nodeRunner Preparing sandbox [worker #0, session #yk79j]\n',
    '2020-11-08T22:49:55.158Z nodeRunner Prepared sandbox [worker #0, session #yk79j]\n',
    '2020-11-08T22:49:55.158Z workers [worker #0, session #yk79j] Running tests in sandbox\n',
    '2020-11-08T22:49:58.810Z workers [yk79j] Loaded 61 test(s)\n',
    '2020-11-08T22:49:58.811Z workers [yk79j] Test executed: Root > renders sign in by default\n',
    '2020-11-08T22:49:58.821Z workers [yk79j] Test executed: Root > renders sign in with password reset when token is present\n',
    '2020-11-08T22:49:58.892Z workers [yk79j] Test executed: Sign In > renders sign in by default and validates all fields\n',
    '2020-11-08T22:49:58.913Z workers [yk79j] Test executed: ResendVerification > sends email if exists\n',
    '2020-11-08T22:49:58.935Z workers [yk79j] Test executed: Reset password > resets password and changes back to sign in\n',
    '2020-11-08T22:49:58.942Z workers [yk79j] Test executed: Reset password > fails and displays message\n',
    '2020-11-08T22:49:59.123Z workers [yk79j] Test executed: RequestResetPassword > sends email with password reset instructions\n',
    '2020-11-08T22:49:59.135Z workers [yk79j] Test executed: Sign Up > registers sign up view\n',
    '2020-11-08T22:49:59.136Z workers [yk79j] Test executed: tests isRequired\n',
    '2020-11-08T22:49:59.138Z workers [yk79j] Test executed: tests required with message\n',
    '2020-11-08T22:49:59.138Z workers [yk79j] Test executed: tests isInt\n',
    '2020-11-08T22:49:59.142Z workers [yk79j] Test executed: tests integer with message\n',
    '2020-11-08T22:49:59.143Z workers [yk79j] Test executed: tests number\n',
    '2020-11-08T22:49:59.146Z workers [yk79j] Test executed: tests number with message\n',
    '2020-11-08T22:49:59.148Z workers [yk79j] Test executed: tests minimum value\n',
    '2020-11-08T22:49:59.149Z workers [yk79j] Test executed: tests maximum value\n',
    '2020-11-08T22:49:59.150Z workers [yk79j] Test executed: tests email\n',
    '2020-11-08T22:49:59.151Z workers [yk79j] Test executed: tests minLength\n',
    '2020-11-08T22:49:59.153Z workers [yk79j] Test executed: tests maxLength\n',
    '2020-11-08T22:49:59.154Z workers [yk79j] Test executed: tests equality\n',
    '2020-11-08T22:49:59.155Z workers [yk79j] Test executed: tests hard equality\n',
    '2020-11-08T22:49:59.156Z workers [yk79j] Test executed: tests regexp\n',
    '2020-11-08T22:49:59.157Z workers [yk79j] Test executed: tests to be same as another field\n',
    '2020-11-08T22:49:59.157Z workers [yk79j] Test executed: executes linked test\n',
    '2020-11-08T22:49:59.162Z workers [yk79j] Test executed: renders default when child is render prop\n',
    '2020-11-08T22:49:59.164Z workers [yk79j] Test executed: renders else\n',
    '2020-11-08T22:49:59.166Z workers [yk79j] Test executed: renders none if all conditions fail without default value\n',
    '2020-11-08T22:49:59.168Z workers [yk79j] Test executed: renders first matching\n',
    '2020-11-08T22:49:59.169Z workers [yk79j] Test executed: renders second matching\n',
    '2020-11-08T22:49:59.184Z workers [yk79j] Test executed: renders no error\n',
    '2020-11-08T22:49:59.186Z workers [yk79j] Test executed: renders error\n',
    '2020-11-08T22:49:59.189Z workers [yk79j] Test executed: renders list\n',
    '2020-11-08T22:49:59.193Z workers [yk79j] Test executed: renders then\n',
    '2020-11-08T22:49:59.196Z workers [yk79j] Test executed: renders else\n',
    '2020-11-08T22:49:59.199Z workers [yk79j] Test executed: renders else\n',
    '2020-11-08T22:49:59.199Z workers [yk79j] Test executed: renders then\n',
    '2020-11-08T22:49:59.207Z workers [yk79j] Test executed: renders no rating\n',
    '2020-11-08T22:49:59.223Z workers [yk79j] Test executed: full rating with five stars\n',
    '2020-11-08T22:49:59.224Z workers [yk79j] Test executed: partial rating with three stars\n',
    '2020-11-08T22:49:59.226Z workers [yk79j] Test executed: allows you to set default options\n',
    '2020-11-08T22:49:59.228Z workers [yk79j] Test executed: creates a new reset email with default template values\n',
    '2020-11-08T22:49:59.229Z workers [yk79j] Test executed: creates a new verification email with default template values\n',
    '2020-11-08T22:49:59.230Z workers [yk79j] Test executed: creates a new reset email and replaces template values\n',
    '2020-11-08T22:49:59.231Z workers [yk79j] Test executed: creates a new verisifcation email and replaces template values\n',
    '2020-11-08T22:49:59.232Z workers [yk79j] Test executed: throws exception when sender or receiver is not specified\n',
    '2020-11-08T22:49:59.233Z workers [yk79j] Test executed: checks for missing MAIL URL and throws excpetion if not initialised\n',
    '2020-11-08T22:49:59.234Z workers [yk79j] Test executed: initialises transporter\n',
    '2020-11-08T22:49:59.236Z workers [yk79j] Test executed: sends reset password with restPassword mail options\n',
    '2020-11-08T22:49:59.237Z workers [yk79j] Test executed: sends verification with verification mail options\n',
    '2020-11-08T22:49:59.663Z workers [yk79j] Test executed: login: can login and throw errors upon unsuccessful login\n',
    '2020-11-08T22:49:59.822Z workers [yk79j] Test executed: createAccount: creates account and checks for organisation access\n',
    '2020-11-08T22:50:00.174Z workers [yk79j] Test executed: refreshTokens: allows to use refresh tokens to obtain an access token\n',
    '2020-11-08T22:50:00.453Z workers [yk79j] Test executed: signOut: removes refresh tokens and remove the cookie\n',
    '2020-11-08T22:50:00.529Z workers [yk79j] Test executed: resetPassword: sends verification email to the user\n',
    '2020-11-08T22:50:00.604Z workers [yk79j] Test executed: requestVerification: sends verification email to the user\n',
    '2020-11-08T22:50:00.751Z workers [yk79j] Test executed: verify: verifies received token\n',
    '2020-11-08T22:50:00.960Z workers [yk79j] Test executed: resetPassword: create a new password if token is correct\n',
    '2020-11-08T22:50:00.971Z workers [yk79j] Test executed: notifications return first 10 notifications sorted decremented by date\n',
    '2020-11-08T22:50:01.034Z workers [yk79j] Test executed: notifications: are only for authorised users\n',
    '2020-11-08T22:50:01.104Z workers [yk79j] Test executed: renders logged out and information page\n',
    '2020-11-08T22:50:01.105Z workers [yk79j] Test executed: renders logged in notifications and schedules\n',
    '2020-11-08T22:50:01.135Z workers [yk79j] Run 61 test(s), skipped 0 test(s)\n',
    '2020-11-08T22:50:01.136Z workers [yk79j] Sandbox is responsive, closing it\n',
    '2020-11-08T22:50:01.137Z project Test run finished\n',
    '2020-11-08T22:50:01.137Z project Processed console.log entries\n',
    '2020-11-08T22:50:01.137Z project Processed loading sequences\n',
    '2020-11-08T22:50:01.138Z project Test name duplicate: renders else\n',
    '2020-11-08T22:50:01.138Z project Test name duplicate: renders then\n',
    '2020-11-08T22:50:01.138Z project Processed executed tests\n',
    '2020-11-08T22:50:01.153Z project Processed code coverage\n',
    '2020-11-08T22:50:01.236Z project Test run result processed and sent to IDE\n',
    '2020-11-08T22:50:01.236Z uiService Outgoing message ui:summary\n',
    '2020-11-08T22:50:01.241Z uiService Outgoing message ui:coverageChanged\n',
    '2020-11-08T22:50:07.746Z fs File changed in editor: src/server/resolvers/tests/notifications.test.ts\n',
    '2020-11-08T22:50:07.749Z uiService Outgoing message ui:files\n',
    '2020-11-08T22:50:07.749Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:50:08.839Z project Detected single test [notifications: are only for authorised users] change\n',
    '2020-11-08T22:50:08.841Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:50:09.862Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:50:09.862Z project Test run started; run priority: 2\n',
    '2020-11-08T22:50:09.863Z 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-11-08T22:50:09.864Z workers Starting test run, priority: 2\n',
    '2020-11-08T22:50:09.864Z nodeRunner Starting sandbox [worker #0, session #vua3v]\n',
    '2020-11-08T22:50:09.864Z nodeRunner Preparing sandbox [worker #0, session #vua3v]\n',
    '2020-11-08T22:50:09.864Z nodeRunner Prepared sandbox [worker #0, session #vua3v]\n',
    '2020-11-08T22:50:09.864Z workers [worker #0, session #vua3v] Running tests in sandbox\n',
    '2020-11-08T22:50:09.873Z workers Sandbox (active) [vua3v] error: Mocha instance is currently running tests, cannot start a next test run until this one is done\n',
    '2020-11-08T22:50:09.874Z workers Failed to map the stack to user code, entry message: Mocha instance is currently running tests, cannot start a next test run until this one is done, stack: Error: Mocha instance is currently running tests, cannot start a next test run until this one is done\n' +
      '    at createMochaInstanceAlreadyRunningError (C:\\Users\\tomi\\Projects\\Github\\clara\\node_modules\\mocha\\lib\\errors.js:330:13)\n' +
      '    at Mocha._guardRunningStateTransition (C:\\Users\\tomi\\Projects\\Github\\clara\\node_modules\\mocha\\lib\\mocha.js:905:11)\n' +
      '    at Mocha.run (C:\\Users\\tomi\\Projects\\Github\\clara\\node_modules\\mocha\\lib\\mocha.js:963:8)\n' +
      '    at u.<anonymous> (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:4318)\n' +
      '    at n (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:1137)\n' +
      '    at Object.next (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:432)\n' +
      '    at o (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:181)\n' +
      '    at pro\n',
    '2020-11-08T22:50:09.875Z workers Sandbox (active) [vua3v] error: c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14\r\n' +
      'var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i(function(t){t(e)})}return new(i||(i=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,s&&(o=2&i[0]?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;switch(s=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){l.label=i[1];break}if(6===i[0]&&l.label<o[1]){l.label=o[1],o=i;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(i);break}o[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(n){i=[6,n],s=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var r,s,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),"throw":i(1),"return":i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},Mocha;if(global.wallaby._testFrameworkPath)Mocha=require(global.wallaby._testFrameworkPath);else try{Mocha=require("mocha")}catch(e){Mocha=require("./framework/index.js")}var mocha,tracer=global.$_$tracer;tracer.start(function(){return __awaiter(this,void 0,void 0,function(){var e,t,i,n,r;return __generator(this,function(s){switch(s.label){case 0:return e=tracer.initialSpecId(),t=[],n=global.$_$session,r=function(){return n!==global.$_$session},mocha.reporter(function(n){var s=n._grep||/.*/,o=n._invert,a=!1;if(n._invert=!1,n.runTest=function(e){if(!r()){var t=this.test,i=this;this.asyncOnly&&(t.asyncOnly=!0);try{this._addEventListener?this._addEventListener(t,"error",function(e){i.fail(t,e)}):t.on("error",function(e){i.fail(t,e)}),tracer.specSyncStart();try{t.run(e)}finally{tracer.specSyncEnd()}}catch(n){e(n)}}},n.grep=function(e,t){s=e,o=t,n._invert=!1},n.grepTotal=function(e){var t=0;return e.eachTest(function(e){var i=s.test(e.fullTitle());o&&(i=!i),i&&t++}),t},n._grep={test:function(e){var i=s.test(e);if(o&&(i=!i),!i)return!1;if(!tracer.hasSpecFilter())return!0;var n=t.slice(1);return n.push(e.substr(n.join(" ").length+(a&&0===n.length?0:1))),tracer.specFilter(n)}},tracer.needToNotifySingleTestRun()){var l=n.hook;n.hook=function(e,t){if(!r()){if("afterEach"!==e)return Function.prototype.apply.call(l,this,arguments);var i=arguments,s=this;tracer.notifySingleTestAfterEach(function(){Function.prototype.apply.call(l,s,i)}),n.hook=l}}}n.on("start",function(){r()||tracer.started({total:n.total})}),n.on("end",function(){r()||tracer.complete()}),n.on("suite",function(e){a=a||!!e.titlePath,r()||(t.push(e.title),i=e)}),n.on("suite end",function(){r()||t.pop()}),n.on("test",function(t){r()||(t._id=++e,t._failures=[],t._time=(new tracer._Date).getTime(),tracer.specStart(t._id,t.title))}),n.on("fail",function(e,t){r()||("hook"===e.type||e._finished?(e._hook="hook"===e.type&&e.title||!0,e._failures=[t],n.emit("test end",e)):e._failures.push(t))}),n.on("test end",function(i){if(!r()){i._finished=!0;var n=tracer.specEnd(),s=function(e){return!!e&&(e.pending===!0||s(e.parent))},o=s(i),a="passed"===i.state,l=o?"skipped":"executed",c={id:void 0===i._id?++e:i._id,timeRange:n,name:i.title,suite:t.slice(1),status:l,time:o?0:(new tracer._Date).getTime()-i._time,log:[],hook:i._hook,slow:i.slow?i.duration>i.slow():void 0,testFile:i._testFile};if(!a&&!o)for(var u=i._failures,h=0;h<u.length;h++){var p=u[h];c.log.push(tracer.setAssertionData(p,{message:p.message,stack:p.stack}))}c.log.length||delete c.log,tracer.result(c)}})}),mocha.suite.on("pre-require",function(e){var t=e.it;e.it=function(){var e=Function.prototype.apply.call(t,this,arguments);return e._testFile=tracer.entryFile(),e},Object.keys(t).forEach(function(i){e.it[i]=t[i]})}),mocha.loadFilesAsync?[4,mocha.loadFilesAsync()]:[3,2];case 1:s.sent(),s.label=2;case 2:return mocha.run(function(){}),[2]}})})}),module.exports={init:function(e){mocha&&mocha.dispose&&mocha.dispose(),mocha=new Mocha,mocha.files=e;try{mocha.slow&&mocha.slow(global.wallaby.slowTestThreshold),mocha.fullTrace&&mocha.fullTrace()}catch(t){}return mocha}};\r\n' +
      '                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            \r\n' +
      '\r\n' +
      "TypeError: Cannot read property 'push' of undefined\r\n",
    '2020-11-08T22:50:09.875Z workers Failed to map the stack to user code, entry message: c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14\r\n' +
      'var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i(function(t){t(e)})}return new(i||(i=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,s&&(o=2&i[0]?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;switch(s=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(6===i, stack: c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14\r\n' +
      'var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i(function(t){t(e)})}return new(i||(i=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,s&&(o=2&i[0]?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;switch(s=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(6===i\n',
    '2020-11-08T22:50:09.987Z workers [vua3v] Sandbox can not be pinged: not opened\n',
    '2020-11-08T22:50:09.987Z workers [vua3v] Sandbox is not responsive, recycling worker instance\n',
    '2020-11-08T22:50:09.987Z workers [vua3v] Sandbox closing error, not opened\n',
    '2020-11-08T22:50:09.987Z workers [vua3v] Run 0 test(s), skipped 0 test(s)\n',
    '2020-11-08T22:50:09.987Z project Test run finished\n',
    '2020-11-08T22:50:09.988Z project Processed console.log entries\n',
    '2020-11-08T22:50:09.988Z project Processed loading sequences\n',
    '2020-11-08T22:50:09.988Z project Processed executed tests\n',
    '2020-11-08T22:50:09.988Z project Processed code coverage\n',
    '2020-11-08T22:50:09.991Z project Test run result processed and sent to IDE\n',
    '2020-11-08T22:50:09.991Z uiService Outgoing message ui:summary\n',
    '2020-11-08T22:50:09.991Z uiService Outgoing message ui:coverageChanged\n',
    '2020-11-08T22:50:20.111Z fs File changed in editor: src/server/resolvers/tests/notifications.test.ts\n',
    '2020-11-08T22:50:20.115Z uiService Outgoing message ui:files\n',
    '2020-11-08T22:50:20.115Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:50:20.258Z project Detected single test [notifications: are only for authorised users] change\n',
    '2020-11-08T22:50:20.260Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:50:21.269Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:50:21.269Z project Test run started; run priority: 2\n',
    '2020-11-08T22:50:21.269Z 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-11-08T22:50:21.271Z workers Starting test run, priority: 2\n',
    '2020-11-08T22:50:21.271Z nodeRunner Starting sandbox [worker #0, session #gvl4o]\n',
    '2020-11-08T22:50:21.271Z nodeRunner Preparing sandbox [worker #0, session #gvl4o]\n',
    '2020-11-08T22:50:21.271Z workers Starting run worker instance #0\n',
    '2020-11-08T22:50:21.431Z workers Started run worker instance (delayed) #0\n',
    '2020-11-08T22:50:21.431Z nodeRunner Prepared sandbox [worker #0, session #gvl4o]\n',
    '2020-11-08T22:50:21.432Z workers [worker #0, session #gvl4o] Running tests in sandbox\n',
    '2020-11-08T22:50:23.414Z workers [gvl4o] Loaded 2 test(s)\n',
    '2020-11-08T22:50:23.429Z workers [gvl4o] Test executed: notifications return first 10 notifications sorted decremented by date\n',
    '2020-11-08T22:50:23.433Z workers [gvl4o] Test executed: notifications: are only for authorised users\n',
    '2020-11-08T22:50:23.459Z workers [gvl4o] Run 2 test(s), skipped 0 test(s)\n',
    '2020-11-08T22:50:23.460Z workers [gvl4o] Sandbox is responsive, closing it\n',
    '2020-11-08T22:50:23.461Z project Test run finished\n',
    '2020-11-08T22:50:23.461Z project Processed console.log entries\n',
    '2020-11-08T22:50:23.461Z project Processed loading sequences\n',
    '2020-11-08T22:50:23.461Z project Processed executed tests\n',
    '2020-11-08T22:50:23.468Z project Processed code coverage\n',
    '2020-11-08T22:50:23.479Z project Test run result processed and sent to IDE\n',
    '2020-11-08T22:50:23.480Z uiService Outgoing message ui:summary\n',
    '2020-11-08T22:50:23.481Z uiService Outgoing message ui:coverageChanged\n',
    '2020-11-08T22:50:44.163Z fs File changed in editor: src/server/resolvers/tests/notifications.test.ts\n',
    '2020-11-08T22:50:44.164Z uiService Outgoing message ui:files\n',
    '2020-11-08T22:50:44.164Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:50:44.272Z project Detected single test [notifications: are only for authorised users] change\n',
    '2020-11-08T22:50:44.273Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:50:45.282Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:50:45.282Z project Test run started; run priority: 2\n',
    '2020-11-08T22:50:45.282Z 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-11-08T22:50:45.283Z workers Starting test run, priority: 2\n',
    '2020-11-08T22:50:45.283Z nodeRunner Starting sandbox [worker #0, session #a4xdm]\n',
    '2020-11-08T22:50:45.283Z nodeRunner Preparing sandbox [worker #0, session #a4xdm]\n',
    '2020-11-08T22:50:45.283Z nodeRunner Prepared sandbox [worker #0, session #a4xdm]\n',
    '2020-11-08T22:50:45.283Z workers [worker #0, session #a4xdm] Running tests in sandbox\n',
    '2020-11-08T22:50:45.293Z workers Sandbox (active) [a4xdm] error: Mocha instance is currently running tests, cannot start a next test run until this one is done\n',
    '2020-11-08T22:50:45.293Z workers Failed to map the stack to user code, entry message: Mocha instance is currently running tests, cannot start a next test run until this one is done, stack: Error: Mocha instance is currently running tests, cannot start a next test run until this one is done\n' +
      '    at createMochaInstanceAlreadyRunningError (C:\\Users\\tomi\\Projects\\Github\\clara\\node_modules\\mocha\\lib\\errors.js:330:13)\n' +
      '    at Mocha._guardRunningStateTransition (C:\\Users\\tomi\\Projects\\Github\\clara\\node_modules\\mocha\\lib\\mocha.js:905:11)\n' +
      '    at Mocha.run (C:\\Users\\tomi\\Projects\\Github\\clara\\node_modules\\mocha\\lib\\mocha.js:963:8)\n' +
      '    at u.<anonymous> (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:4318)\n' +
      '    at n (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:1137)\n' +
      '    at Object.next (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:432)\n' +
      '    at o (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:181)\n' +
      '    at pro\n',
    '2020-11-08T22:50:45.295Z workers Sandbox (active) [a4xdm] error: c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14\r\n' +
      'var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i(function(t){t(e)})}return new(i||(i=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,s&&(o=2&i[0]?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;switch(s=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){l.label=i[1];break}if(6===i[0]&&l.label<o[1]){l.label=o[1],o=i;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(i);break}o[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(n){i=[6,n],s=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var r,s,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),"throw":i(1),"return":i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},Mocha;if(global.wallaby._testFrameworkPath)Mocha=require(global.wallaby._testFrameworkPath);else try{Mocha=require("mocha")}catch(e){Mocha=require("./framework/index.js")}var mocha,tracer=global.$_$tracer;tracer.start(function(){return __awaiter(this,void 0,void 0,function(){var e,t,i,n,r;return __generator(this,function(s){switch(s.label){case 0:return e=tracer.initialSpecId(),t=[],n=global.$_$session,r=function(){return n!==global.$_$session},mocha.reporter(function(n){var s=n._grep||/.*/,o=n._invert,a=!1;if(n._invert=!1,n.runTest=function(e){if(!r()){var t=this.test,i=this;this.asyncOnly&&(t.asyncOnly=!0);try{this._addEventListener?this._addEventListener(t,"error",function(e){i.fail(t,e)}):t.on("error",function(e){i.fail(t,e)}),tracer.specSyncStart();try{t.run(e)}finally{tracer.specSyncEnd()}}catch(n){e(n)}}},n.grep=function(e,t){s=e,o=t,n._invert=!1},n.grepTotal=function(e){var t=0;return e.eachTest(function(e){var i=s.test(e.fullTitle());o&&(i=!i),i&&t++}),t},n._grep={test:function(e){var i=s.test(e);if(o&&(i=!i),!i)return!1;if(!tracer.hasSpecFilter())return!0;var n=t.slice(1);return n.push(e.substr(n.join(" ").length+(a&&0===n.length?0:1))),tracer.specFilter(n)}},tracer.needToNotifySingleTestRun()){var l=n.hook;n.hook=function(e,t){if(!r()){if("afterEach"!==e)return Function.prototype.apply.call(l,this,arguments);var i=arguments,s=this;tracer.notifySingleTestAfterEach(function(){Function.prototype.apply.call(l,s,i)}),n.hook=l}}}n.on("start",function(){r()||tracer.started({total:n.total})}),n.on("end",function(){r()||tracer.complete()}),n.on("suite",function(e){a=a||!!e.titlePath,r()||(t.push(e.title),i=e)}),n.on("suite end",function(){r()||t.pop()}),n.on("test",function(t){r()||(t._id=++e,t._failures=[],t._time=(new tracer._Date).getTime(),tracer.specStart(t._id,t.title))}),n.on("fail",function(e,t){r()||("hook"===e.type||e._finished?(e._hook="hook"===e.type&&e.title||!0,e._failures=[t],n.emit("test end",e)):e._failures.push(t))}),n.on("test end",function(i){if(!r()){i._finished=!0;var n=tracer.specEnd(),s=function(e){return!!e&&(e.pending===!0||s(e.parent))},o=s(i),a="passed"===i.state,l=o?"skipped":"executed",c={id:void 0===i._id?++e:i._id,timeRange:n,name:i.title,suite:t.slice(1),status:l,time:o?0:(new tracer._Date).getTime()-i._time,log:[],hook:i._hook,slow:i.slow?i.duration>i.slow():void 0,testFile:i._testFile};if(!a&&!o)for(var u=i._failures,h=0;h<u.length;h++){var p=u[h];c.log.push(tracer.setAssertionData(p,{message:p.message,stack:p.stack}))}c.log.length||delete c.log,tracer.result(c)}})}),mocha.suite.on("pre-require",function(e){var t=e.it;e.it=function(){var e=Function.prototype.apply.call(t,this,arguments);return e._testFile=tracer.entryFile(),e},Object.keys(t).forEach(function(i){e.it[i]=t[i]})}),mocha.loadFilesAsync?[4,mocha.loadFilesAsync()]:[3,2];case 1:s.sent(),s.label=2;case 2:return mocha.run(function(){}),[2]}})})}),module.exports={init:function(e){mocha&&mocha.dispose&&mocha.dispose(),mocha=new Mocha,mocha.files=e;try{mocha.slow&&mocha.slow(global.wallaby.slowTestThreshold),mocha.fullTrace&&mocha.fullTrace()}catch(t){}return mocha}};\r\n' +
      '                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            \r\n' +
      '\r\n' +
      "TypeError: Cannot read property 'push' of undefined\r\n",
    '2020-11-08T22:50:45.295Z workers Failed to map the stack to user code, entry message: c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14\r\n' +
      'var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i(function(t){t(e)})}return new(i||(i=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,s&&(o=2&i[0]?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;switch(s=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(6===i, stack: c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14\r\n' +
      'var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i(function(t){t(e)})}return new(i||(i=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,s&&(o=2&i[0]?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;switch(s=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(6===i\n',
    '2020-11-08T22:50:45.407Z workers [a4xdm] Sandbox can not be pinged: not opened\n',
    '2020-11-08T22:50:45.407Z workers [a4xdm] Sandbox is not responsive, recycling worker instance\n',
    '2020-11-08T22:50:45.407Z workers [a4xdm] Sandbox closing error, not opened\n',
    '2020-11-08T22:50:45.407Z workers [a4xdm] Run 0 test(s), skipped 0 test(s)\n',
    '2020-11-08T22:50:45.407Z project Test run finished\n',
    '2020-11-08T22:50:45.407Z project Processed console.log entries\n',
    '2020-11-08T22:50:45.407Z project Processed loading sequences\n',
    '2020-11-08T22:50:45.407Z project Processed executed tests\n',
    '2020-11-08T22:50:45.407Z project Processed code coverage\n',
    '2020-11-08T22:50:45.409Z project Test run result processed and sent to IDE\n',
    '2020-11-08T22:50:45.409Z uiService Outgoing message ui:summary\n',
    '2020-11-08T22:50:45.409Z uiService Outgoing message ui:coverageChanged\n',
    '2020-11-08T22:52:08.250Z fs File changed in editor: src/server/resolvers/tests/notifications.test.ts\n',
    '2020-11-08T22:52:08.250Z uiService Outgoing message ui:files\n',
    '2020-11-08T22:52:08.251Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:52:08.279Z project Error: Failed to run compilers on src/server/resolvers/tests/notifications.test.ts, SyntaxError: .\\src\\server\\resolvers\\tests\\notifications.test.ts: Unexpected token, expected ";" (38:47)\n' +
      '\n' +
      '  36 |       const context = await initContext();\n' +
      '  37 | \n' +
      '> 38 |       const notifications = await Query!.notif ications!({}, {}, context);\n' +
      '     |                                                ^\n' +
      '  39 |       expect(notifications).toHaveLength(10);   \n' +
      '  40 | \n' +
      '  41 |       // check sorted by date\n' +
      '    at Object._raise (.\\node_modules\\@babel\\parser\\lib\\index.js:799:17)\n' +
      '    at Object.raiseWithData (.\\node_modules\\@babel\\parser\\lib\\index.js:792:17)\n' +
      '    at Object.raise (.\\node_modules\\@babel\\parser\\lib\\index.js:786:17)\n' +
      '    at Object.unexpected (.\\node_modules\\@babel\\parser\\lib\\index.js:9089:16)\n' +
      '    at Object.semicolon (.\\node_modules\\@babel\\parser\\lib\\index.js:9071:40)\n' +
      '    at Object.parseVarStatement (.\\node_modules\\@babel\\parser\\lib\\index.js:12053:10)\n' +
      '    at Object.parseStatementContent (.\\node_modules\\@babel\\parser\\lib\\index.js:11644:21)\n' +
      '    at Object.parseStatementContent (.\\node_modules\\@babel\\parser\\lib\\index.js:6786:18)\n' +
      '    at Object.parseStatement (.\\node_modules\\@babel\\parser\\lib\\index.js:11577:17)\n' +
      '    at Object.parseBlockOrModuleBlockBody (.\\node_modules\\@babel\\parser\\lib\\index.js:12159:25)\n' +
      '    at Object.parseBlockBody (.\\node_modules\\@babel\\parser\\lib\\index.js:12145:10)\n' +
      '    at Object.parseBlock (.\\node_modules\\@babel\\parser\\lib\\index.js:12129:10)\n' +
      '    at Object.parseFunctionBody (.\\node_modules\\@babel\\parser\\lib\\index.js:11108:24)\n' +
      '    at Object.parseFunctionBodyAndFinish (.\\node_modules\\@babel\\parser\\lib\\index.js:11091:10)\n' +
      '    at Object.parseFunctionBodyAndFinish (.\\node_modules\\@babel\\parser\\lib\\index.js:6592:11)\n' +
      '    at .\\node_modules\\@babel\\parser\\lib\\index.js:12299:12\n' +
      '    at Object.withTopicForbiddingContext (.\\node_modules\\@babel\\parser\\lib\\index.js:11417:14)\n' +
      '    at Object.parseFunction (.\\node_modules\\@babel\\parser\\lib\\index.js:12298:10)\n' +
      '    at Object.parseExprAtom (.\\node_modules\\@babel\\parser\\lib\\index.js:10261:27)\n' +
      '    at Object.parseExprSubscripts (.\\node_modules\\@babel\\parser\\lib\\index.js:9976:23)\n' +
      '    at Object.parseUpdate (.\\node_modules\\@babel\\parser\\lib\\index.js:9956:21)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:9945:17)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:7106:20)\n' +
      '    at Object.parseExprOps (.\\node_modules\\@babel\\parser\\lib\\index.js:9815:23)\n' +
      '    at Object.parseMaybeConditional (.\\node_modules\\@babel\\parser\\lib\\index.js:9789:23)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:9752:21)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:7051:20)\n' +
      '    at .\\node_modules\\@babel\\parser\\lib\\index.js:9718:39\n' +
      '    at Object.allowInAnd (.\\node_modules\\@babel\\parser\\lib\\index.js:11448:12)\n' +
      '    at Object.parseMaybeAssignAllowIn (.\\node_modules\\@babel\\parser\\lib\\index.js:9718:17)\n' +
      '    at Object.parseExprListItem (.\\node_modules\\@babel\\parser\\lib\\index.js:11196:18)\n' +
      '    at Object.parseCallExpressionArguments (.\\node_modules\\@babel\\parser\\lib\\index.js:10187:22)\n' +
      '    at Object.parseCoverCallAndAsyncArrowHead (.\\node_modules\\@babel\\parser\\lib\\index.js:10092:29)\n' +
      '    at Object.parseSubscript (.\\node_modules\\@babel\\parser\\lib\\index.js:10028:19)\n' +
      '    at Object.parseSubscript (.\\node_modules\\@babel\\parser\\lib\\index.js:6657:18)\n' +
      '    at Object.parseSubscripts (.\\node_modules\\@babel\\parser\\lib\\index.js:9999:19)\n' +
      '    at Object.parseExprSubscripts (.\\node_modules\\@babel\\parser\\lib\\index.js:9982:17)\n' +
      '    at Object.parseUpdate (.\\node_modules\\@babel\\parser\\lib\\index.js:9956:21)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:9945:17)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:7106:20)\n' +
      '    at Object.parseExprOps (.\\node_modules\\@babel\\parser\\lib\\index.js:9815:23)\n' +
      '    at Object.parseMaybeConditional (.\\node_modules\\@babel\\parser\\lib\\index.js:9789:23)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:9752:21)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:7051:20)\n' +
      '    at Object.parseExpressionBase (.\\node_modules\\@babel\\parser\\lib\\index.js:9696:23)\n' +
      '    at .\\node_modules\\@babel\\parser\\lib\\index.js:9690:39\n' +
      '    at Object.allowInAnd (.\\node_modules\\@babel\\parser\\lib\\index.js:11448:12)\n' +
      '    at Object.parseExpression (.\\node_modules\\@babel\\parser\\lib\\index.js:9690:17)\n' +
      '    at Object.parseStatementContent (.\\node_modules\\@babel\\parser\\lib\\index.js:11708:23)\n' +
      '    at Object.parseStatementContent (.\\node_modules\\@babel\\parser\\lib\\index.js:6786:18)\n' +
      '    at Object.parseStatement (.\\node_modules\\@babel\\parser\\lib\\index.js:11577:17)\n' +
      '    at Object.parseBlockOrModuleBlockBody (.\\node_modules\\@babel\\parser\\lib\\index.js:12159:25)\n' +
      '    at Object.parseBlockBody (.\\node_modules\\@babel\\parser\\lib\\index.js:12145:10)\n' +
      '    at Object.parseBlock (.\\node_modules\\@babel\\parser\\lib\\index.js:12129:10)\n' +
      '    at Object.parseFunctionBody (.\\node_modules\\@babel\\parser\\lib\\index.js:11108:24)\n' +
      '    at Object.parseArrowExpression (.\\node_modules\\@babel\\parser\\lib\\index.js:11077:10)\n' +
      '    at Object.parseParenAndDistinguishExpression (.\\node_modules\\@babel\\parser\\lib\\index.js:10635:12)\n' +
      '    at Object.parseExprAtom (.\\node_modules\\@babel\\parser\\lib\\index.js:10311:21)\n' +
      '    at Object.parseExprSubscripts (.\\node_modules\\@babel\\parser\\lib\\index.js:9976:23)\n' +
      '    at Object.parseUpdate (.\\node_modules\\@babel\\parser\\lib\\index.js:9956:21)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:9945:17)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:7106:20)\n' +
      '    at Object.parseExprOps (.\\node_modules\\@babel\\parser\\lib\\index.js:9815:23)\n' +
      '    at Object.parseMaybeConditional (.\\node_modules\\@babel\\parser\\lib\\index.js:9789:23)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:9752:21)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:7051:20)\n' +
      '    at .\\node_modules\\@babel\\parser\\lib\\index.js:9718:39\n' +
      '    at Object.allowInAnd (.\\node_modules\\@babel\\parser\\lib\\index.js:11448:12)\n' +
      '    at Object.parseMaybeAssignAllowIn (.\\node_modules\\@babel\\parser\\lib\\index.js:9718:17)\n' +
      '    at Object.parseExprListItem (.\\node_modules\\@babel\\parser\\lib\\index.js:11196:18)\n' +
      '    at Object.parseCallExpressionArguments (.\\node_modules\\@babel\\parser\\lib\\index.js:10187:22)\n' +
      '    at Object.parseCoverCallAndAsyncArrowHead (.\\node_modules\\@babel\\parser\\lib\\index.js:10092:29)\n' +
      '    at Object.parseSubscript (.\\node_modules\\@babel\\parser\\lib\\index.js:10028:19)\n' +
      '    at Object.parseSubscript (.\\node_modules\\@babel\\parser\\lib\\index.js:6657:18)\n' +
      '    at Object.parseSubscripts (.\\node_modules\\@babel\\parser\\lib\\index.js:9999:19)\n' +
      '    at Object.parseExprSubscripts (.\\node_modules\\@babel\\parser\\lib\\index.js:9982:17)\n' +
      '    at Object.parseUpdate (.\\node_modules\\@babel\\parser\\lib\\index.js:9956:21)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:9945:17)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:7106:20)\n' +
      '    at Object.parseExprOps (.\\node_modules\\@babel\\parser\\lib\\index.js:9815:23)\n' +
      '    at Object.parseMaybeConditional (.\\node_modules\\@babel\\parser\\lib\\index.js:9789:23)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:9752:21)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:7051:20)\n' +
      '    at Object.parseExpressionBase (.\\node_modules\\@babel\\parser\\lib\\index.js:9696:23)\n' +
      '    at .\\node_modules\\@babel\\parser\\lib\\index.js:9690:39\n' +
      '    at Object.allowInAnd (.\\node_modules\\@babel\\parser\\lib\\index.js:11448:12)\n' +
      '    at Object.parseExpression (.\\node_modules\\@babel\\parser\\lib\\index.js:9690:17)\n' +
      '    at Object.parseStatementContent (.\\node_modules\\@babel\\parser\\lib\\index.js:11708:23)\n' +
      '    at Object.parseStatementContent (.\\node_modules\\@babel\\parser\\lib\\index.js:6786:18)\n' +
      '    at Object.parseStatement (.\\node_modules\\@babel\\parser\\lib\\index.js:11577:17)\n' +
      '    at Object.parseBlockOrModuleBlockBody (.\\node_modules\\@babel\\parser\\lib\\index.js:12159:25)\n' +
      '    at Object.parseBlockBody (.\\node_modules\\@babel\\parser\\lib\\index.js:12145:10)\n' +
      '    at Object.parseBlock (.\\node_modules\\@babel\\parser\\lib\\index.js:12129:10)\n' +
      '    at Object.parseFunctionBody (.\\node_modules\\@babel\\parser\\lib\\index.js:11108:24)\n' +
      '    at Object.parseArrowExpression (.\\node_modules\\@babel\\parser\\lib\\index.js:11077:10)\n' +
      '    at Object.parseParenAndDistinguishExpression (.\\node_modules\\@babel\\parser\\lib\\index.js:10635:12)\n' +
      '    at Object.parseExprAtom (.\\node_modules\\@babel\\parser\\lib\\index.js:10311:21)\n' +
      '    at Object.parseExprSubscripts (.\\node_modules\\@babel\\parser\\lib\\index.js:9976:23)\n' +
      '    at Object.parseUpdate (.\\node_modules\\@babel\\parser\\lib\\index.js:9956:21)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:9945:17)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:7106:20)\n' +
      '    at Object.parseExprOps (.\\node_modules\\@babel\\parser\\lib\\index.js:9815:23)\n' +
      '    at Object.parseMaybeConditional (.\\node_modules\\@babel\\parser\\lib\\index.js:9789:23)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:9752:21)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:7051:20)\n' +
      '    at .\\node_modules\\@babel\\parser\\lib\\index.js:9718:39\n' +
      '    at Object.allowInAnd (.\\node_modules\\@babel\\parser\\lib\\index.js:11448:12)\n' +
      '    at Object.parseMaybeAssignAllowIn (.\\node_modules\\@babel\\parser\\lib\\index.js:9718:17)\n' +
      '    at Object.parseExprListItem (.\\node_modules\\@babel\\parser\\lib\\index.js:11196:18)\n' +
      '    at Object.parseCallExpressionArguments (.\\node_modules\\@babel\\parser\\lib\\index.js:10187:22)\n' +
      '    at Object.parseCoverCallAndAsyncArrowHead (.\\node_modules\\@babel\\parser\\lib\\index.js:10092:29)\n' +
      '    at Object.parseSubscript (.\\node_modules\\@babel\\parser\\lib\\index.js:10028:19)\n' +
      '    at Object.parseSubscript (.\\node_modules\\@babel\\parser\\lib\\index.js:6657:18)\n' +
      '    at Object.parseSubscripts (.\\node_modules\\@babel\\parser\\lib\\index.js:9999:19)\n' +
      '    at Object.parseExprSubscripts (.\\node_modules\\@babel\\parser\\lib\\index.js:9982:17)\n' +
      '    at Object.parseUpdate (.\\node_modules\\@babel\\parser\\lib\\index.js:9956:21)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:9945:17)\n' +
      '    at Object.parseMaybeUnary (.\\node_modules\\@babel\\parser\\lib\\index.js:7106:20)\n' +
      '    at Object.parseExprOps (.\\node_modules\\@babel\\parser\\lib\\index.js:9815:23)\n' +
      '    at Object.parseMaybeConditional (.\\node_modules\\@babel\\parser\\lib\\index.js:9789:23)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:9752:21)\n' +
      '    at Object.parseMaybeAssign (.\\node_modules\\@babel\\parser\\lib\\index.js:7051:20)\n' +
      '    at Object.parseExpressionBase (.\\node_modules\\@babel\\parser\\lib\\index.js:9696:23)\n' +
      '    at .\\node_modules\\@babel\\parser\\lib\\index.js:9690:39\n' +
      '    at Object.allowInAnd (.\\node_modules\\@babel\\parser\\lib\\index.js:11442:16)\n' +
      '    at Object.parseExpression (.\\node_modules\\@babel\\parser\\lib\\index.js:9690:17)\n' +
      '    at Object.parseStatementContent (.\\node_modules\\@babel\\parser\\lib\\index.js:11708:23)\n' +
      '    at Object.parseStatementContent (.\\node_modules\\@babel\\parser\\lib\\index.js:6786:18)\n' +
      '    at Object.parseStatement (.\\node_modules\\@babel\\parser\\lib\\index.js:11577:17)\n' +
      '    at Object.parseBlockOrModuleBlockBody (.\\node_modules\\@babel\\parser\\lib\\index.js:12159:25)\n' +
      '    at Object.parseBlockBody (.\\node_modules\\@babel\\parser\\lib\\index.js:12145:10)\n' +
      '    at Object.parseTopLevel (.\\node_modules\\@babel\\parser\\lib\\index.js:11508:10)\n' +
      '    at Object.parse (.\\node_modules\\@babel\\parser\\lib\\index.js:13328:10)\n' +
      '    at parse (.\\node_modules\\@babel\\parser\\lib\\index.js:13356:26)\n' +
      '    at parser (.\\node_modules\\@babel\\core\\lib\\parser\\index.js:54:34)\n' +
      '    at parser.next (<anonymous>)\n' +
      '    at normalizeFile (.\\node_modules\\@babel\\core\\lib\\transformation\\normalize-file.js:99:38)\n' +
      '    at normalizeFile.next (<anonymous>)\n' +
      '    at run (.\\node_modules\\@babel\\core\\lib\\transformation\\index.js:31:50)\n' +
      '    at run.next (<anonymous>)\n' +
      '    at Function.transform (.\\node_modules\\@babel\\core\\lib\\transform.js:27:41)\n' +
      '    at transform.next (<anonymous>)\n' +
      '    at evaluateSync (.\\node_modules\\gensync\\index.js:251:28)\n' +
      '    at Function.sync (.\\node_modules\\gensync\\index.js:89:14)\n' +
      '    at Object.transform (.\\node_modules\\@babel\\core\\lib\\transform.js:36:54)\n' +
      '    at processTicksAndRejections (internal/process/task_queues.js:79:11)\n' +
      '    at c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\server.js:24:10463\n' +
      '    at processTicksAndRejections (internal/process/task_queues.js:97:5)\n',
    '2020-11-08T22:52:08.280Z project Changes did not trigger any tests\n',
    '2020-11-08T22:52:08.280Z uiService Outgoing message ui:summary\n',
    '2020-11-08T22:52:08.280Z uiService Outgoing message ui:summary\n',
    '2020-11-08T22:52:09.145Z fs File changed in editor: src/server/resolvers/tests/notifications.test.ts\n',
    '2020-11-08T22:52:09.146Z uiService Outgoing message ui:files\n',
    '2020-11-08T22:52:09.146Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:52:09.265Z project Detected single test [notifications: are only for authorised users] change\n',
    '2020-11-08T22:52:09.268Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:52:10.280Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:52:10.280Z project Test run started; run priority: 2\n',
    '2020-11-08T22:52:10.280Z 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-11-08T22:52:10.281Z workers Starting test run, priority: 2\n',
    '2020-11-08T22:52:10.281Z nodeRunner Starting sandbox [worker #0, session #yun58]\n',
    '2020-11-08T22:52:10.281Z nodeRunner Preparing sandbox [worker #0, session #yun58]\n',
    '2020-11-08T22:52:10.281Z workers Starting run worker instance #0\n',
    '2020-11-08T22:52:10.438Z workers Started run worker instance (delayed) #0\n',
    '2020-11-08T22:52:10.439Z nodeRunner Prepared sandbox [worker #0, session #yun58]\n',
    '2020-11-08T22:52:10.439Z workers [worker #0, session #yun58] Running tests in sandbox\n',
    '2020-11-08T22:52:12.479Z workers [yun58] Loaded 2 test(s)\n',
    '2020-11-08T22:52:12.487Z workers [yun58] Test executed: notifications return first 10 notifications sorted decremented by date\n',
    '2020-11-08T22:52:12.491Z workers [yun58] Test executed: notifications: are only for authorised users\n',
    '2020-11-08T22:52:12.517Z workers [yun58] Run 2 test(s), skipped 0 test(s)\n',
    '2020-11-08T22:52:12.518Z workers [yun58] Sandbox is responsive, closing it\n',
    '2020-11-08T22:52:12.518Z project Test run finished\n',
    '2020-11-08T22:52:12.518Z project Processed console.log entries\n',
    '2020-11-08T22:52:12.518Z project Processed loading sequences\n',
    '2020-11-08T22:52:12.519Z project Processed executed tests\n',
    '2020-11-08T22:52:12.523Z project Processed code coverage\n',
    '2020-11-08T22:52:12.531Z project Test run result processed and sent to IDE\n',
    '2020-11-08T22:52:12.531Z uiService Outgoing message ui:summary\n',
    '2020-11-08T22:52:12.532Z uiService Outgoing message ui:coverageChanged\n',
    '2020-11-08T22:52:18.842Z fs File changed in editor: src/server/resolvers/tests/notifications.test.ts\n',
    '2020-11-08T22:52:18.843Z uiService Outgoing message ui:files\n',
    '2020-11-08T22:52:18.843Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:52:18.920Z project Detected single test [notifications: are only for authorised users] change\n',
    '2020-11-08T22:52:18.922Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:52:19.936Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:52:19.936Z project Test run started; run priority: 2\n',
    '2020-11-08T22:52:19.936Z 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-11-08T22:52:19.937Z workers Starting test run, priority: 2\n',
    '2020-11-08T22:52:19.937Z nodeRunner Starting sandbox [worker #0, session #ubs25]\n',
    '2020-11-08T22:52:19.937Z nodeRunner Preparing sandbox [worker #0, session #ubs25]\n',
    '2020-11-08T22:52:19.937Z nodeRunner Prepared sandbox [worker #0, session #ubs25]\n',
    '2020-11-08T22:52:19.937Z workers [worker #0, session #ubs25] Running tests in sandbox\n',
    '2020-11-08T22:52:19.946Z workers Sandbox (active) [ubs25] error: Mocha instance is currently running tests, cannot start a next test run until this one is done\n',
    '2020-11-08T22:52:19.947Z workers Failed to map the stack to user code, entry message: Mocha instance is currently running tests, cannot start a next test run until this one is done, stack: Error: Mocha instance is currently running tests, cannot start a next test run until this one is done\n' +
      '    at createMochaInstanceAlreadyRunningError (C:\\Users\\tomi\\Projects\\Github\\clara\\node_modules\\mocha\\lib\\errors.js:330:13)\n' +
      '    at Mocha._guardRunningStateTransition (C:\\Users\\tomi\\Projects\\Github\\clara\\node_modules\\mocha\\lib\\mocha.js:905:11)\n' +
      '    at Mocha.run (C:\\Users\\tomi\\Projects\\Github\\clara\\node_modules\\mocha\\lib\\mocha.js:963:8)\n' +
      '    at u.<anonymous> (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:4318)\n' +
      '    at n (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:1137)\n' +
      '    at Object.next (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:432)\n' +
      '    at o (c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14:181)\n' +
      '    at pro\n',
    '2020-11-08T22:52:19.948Z workers Sandbox (active) [ubs25] error: c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14\r\n' +
      'var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i(function(t){t(e)})}return new(i||(i=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,s&&(o=2&i[0]?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;switch(s=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){l.label=i[1];break}if(6===i[0]&&l.label<o[1]){l.label=o[1],o=i;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(i);break}o[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(n){i=[6,n],s=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var r,s,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),"throw":i(1),"return":i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},Mocha;if(global.wallaby._testFrameworkPath)Mocha=require(global.wallaby._testFrameworkPath);else try{Mocha=require("mocha")}catch(e){Mocha=require("./framework/index.js")}var mocha,tracer=global.$_$tracer;tracer.start(function(){return __awaiter(this,void 0,void 0,function(){var e,t,i,n,r;return __generator(this,function(s){switch(s.label){case 0:return e=tracer.initialSpecId(),t=[],n=global.$_$session,r=function(){return n!==global.$_$session},mocha.reporter(function(n){var s=n._grep||/.*/,o=n._invert,a=!1;if(n._invert=!1,n.runTest=function(e){if(!r()){var t=this.test,i=this;this.asyncOnly&&(t.asyncOnly=!0);try{this._addEventListener?this._addEventListener(t,"error",function(e){i.fail(t,e)}):t.on("error",function(e){i.fail(t,e)}),tracer.specSyncStart();try{t.run(e)}finally{tracer.specSyncEnd()}}catch(n){e(n)}}},n.grep=function(e,t){s=e,o=t,n._invert=!1},n.grepTotal=function(e){var t=0;return e.eachTest(function(e){var i=s.test(e.fullTitle());o&&(i=!i),i&&t++}),t},n._grep={test:function(e){var i=s.test(e);if(o&&(i=!i),!i)return!1;if(!tracer.hasSpecFilter())return!0;var n=t.slice(1);return n.push(e.substr(n.join(" ").length+(a&&0===n.length?0:1))),tracer.specFilter(n)}},tracer.needToNotifySingleTestRun()){var l=n.hook;n.hook=function(e,t){if(!r()){if("afterEach"!==e)return Function.prototype.apply.call(l,this,arguments);var i=arguments,s=this;tracer.notifySingleTestAfterEach(function(){Function.prototype.apply.call(l,s,i)}),n.hook=l}}}n.on("start",function(){r()||tracer.started({total:n.total})}),n.on("end",function(){r()||tracer.complete()}),n.on("suite",function(e){a=a||!!e.titlePath,r()||(t.push(e.title),i=e)}),n.on("suite end",function(){r()||t.pop()}),n.on("test",function(t){r()||(t._id=++e,t._failures=[],t._time=(new tracer._Date).getTime(),tracer.specStart(t._id,t.title))}),n.on("fail",function(e,t){r()||("hook"===e.type||e._finished?(e._hook="hook"===e.type&&e.title||!0,e._failures=[t],n.emit("test end",e)):e._failures.push(t))}),n.on("test end",function(i){if(!r()){i._finished=!0;var n=tracer.specEnd(),s=function(e){return!!e&&(e.pending===!0||s(e.parent))},o=s(i),a="passed"===i.state,l=o?"skipped":"executed",c={id:void 0===i._id?++e:i._id,timeRange:n,name:i.title,suite:t.slice(1),status:l,time:o?0:(new tracer._Date).getTime()-i._time,log:[],hook:i._hook,slow:i.slow?i.duration>i.slow():void 0,testFile:i._testFile};if(!a&&!o)for(var u=i._failures,h=0;h<u.length;h++){var p=u[h];c.log.push(tracer.setAssertionData(p,{message:p.message,stack:p.stack}))}c.log.length||delete c.log,tracer.result(c)}})}),mocha.suite.on("pre-require",function(e){var t=e.it;e.it=function(){var e=Function.prototype.apply.call(t,this,arguments);return e._testFile=tracer.entryFile(),e},Object.keys(t).forEach(function(i){e.it[i]=t[i]})}),mocha.loadFilesAsync?[4,mocha.loadFilesAsync()]:[3,2];case 1:s.sent(),s.label=2;case 2:return mocha.run(function(){}),[2]}})})}),module.exports={init:function(e){mocha&&mocha.dispose&&mocha.dispose(),mocha=new Mocha,mocha.files=e;try{mocha.slow&&mocha.slow(global.wallaby.slowTestThreshold),mocha.fullTrace&&mocha.fullTrace()}catch(t){}return mocha}};\r\n' +
      '                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            \r\n' +
      '\r\n' +
      "TypeError: Cannot read property 'push' of undefined\r\n",
    '2020-11-08T22:52:19.948Z workers Failed to map the stack to user code, entry message: c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14\r\n' +
      'var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i(function(t){t(e)})}return new(i||(i=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,s&&(o=2&i[0]?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;switch(s=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(6===i, stack: c:\\Users\\tomi\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.248\\wallabya42ab0\\runners\\node\\mocha@2.1.0\\initializer.js:14\r\n' +
      'var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i(function(t){t(e)})}return new(i||(i=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,s&&(o=2&i[0]?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;switch(s=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(6===i\n',
    '2020-11-08T22:52:20.061Z workers [ubs25] Sandbox can not be pinged: not opened\n',
    '2020-11-08T22:52:20.061Z workers [ubs25] Sandbox is not responsive, recycling worker instance\n',
    '2020-11-08T22:52:20.061Z workers [ubs25] Sandbox closing error, not opened\n',
    '2020-11-08T22:52:20.061Z workers [ubs25] Run 0 test(s), skipped 0 test(s)\n',
    '2020-11-08T22:52:20.061Z project Test run finished\n',
    '2020-11-08T22:52:20.061Z project Processed console.log entries\n',
    '2020-11-08T22:52:20.061Z project Processed loading sequences\n',
    '2020-11-08T22:52:20.061Z project Processed executed tests\n',
    '2020-11-08T22:52:20.061Z project Processed code coverage\n',
    '2020-11-08T22:52:20.064Z project Test run result processed and sent to IDE\n',
    '2020-11-08T22:52:20.064Z uiService Outgoing message ui:summary\n',
    '2020-11-08T22:52:20.064Z uiService Outgoing message ui:coverageChanged\n',
    '2020-11-08T22:54:43.874Z fs File changed in editor: src/server/resolvers/tests/notifications.test.ts\n',
    '2020-11-08T22:54:43.875Z uiService Outgoing message ui:files\n',
    '2020-11-08T22:54:43.875Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:54:43.964Z project Detected single test [notifications return first 10 notifications sorted decremented by date] change\n',
    '2020-11-08T22:54:43.965Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:54:44.976Z uiService Outgoing message ui:busy\n',
    '2020-11-08T22:54:44.976Z project Test run started; run priority: 2\n',
    '2020-11-08T22:54:44.976Z 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-11-08T22:54:44.977Z workers Starting test run, priority: 2\n',
    '2020-11-08T22:54:44.977Z nodeRunner Starting sandbox [worker #0, session #tb8xg]\n',
    '2020-11-08T22:54:44.977Z nodeRunner Preparing sandbox [worker #0, session #tb8xg]\n',
    '2020-11-08T22:54:44.977Z workers Starting run worker instance #0\n',
    '2020-11-08T22:54:45.142Z workers Started run worker instance (delayed) #0\n',
    '2020-11-08T22:54:45.142Z nodeRunner Prepared sandbox [worker #0, session #tb8xg]\n',
    '2020-11-08T22:54:45.142Z workers [worker #0, session #tb8xg] Running tests in sandbox\n',
    '2020-11-08T22:54:47.108Z workers [tb8xg] Loaded 2 test(s)\n',
    '2020-11-08T22:54:47.117Z workers [tb8xg] Test executed: notifications return first 10 notifications sorted decremented by date\n',
    '2020-11-08T22:54:47.122Z workers [tb8xg] Test executed: notifications: are only for authorised users\n',
    '2020-11-08T22:54:47.150Z workers [tb8xg] Run 2 test(s), skipped 0 test(s)\n',
    '2020-11-08T22:54:47.151Z workers [tb8xg] Sandbox is responsive, closing it\n',
    '2020-11-08T22:54:47.151Z project Test run finished\n',
    '2020-11-08T22:54:47.151Z project Processed console.log entries\n',
    '2020-11-08T22:54:47.152Z project Processed loading sequences\n',
    '2020-11-08T22:54:47.152Z project Processed executed tests\n',
    '2020-11-08T22:54:47.154Z project Processed code coverage\n',
    '2020-11-08T22:54:47.161Z project Test run result processed and sent to IDE\n',
    '2020-11-08T22:54:47.161Z uiService Outgoing message ui:summary\n',
    '2020-11-08T22:54:47.162Z uiService Outgoing message ui:coverageChanged\n'
  ]
}
smcenlly commented 3 years ago

If you are using wallaby.delayStart() then the subsequent call to wallaby.start() is expected to be asynchronous. You could change your existing code to call wallaby.start() on 2nd execution (line 70) to setImmediate(() => wallaby.start()); or better still, refactor your code a little so that you are not maintaining the delayed state and only call wallaby.delayStart() on the first execution as shown below. If you have any further problems, please let us know.

wallaby.js

// @ts-nocheck
// eslint-disable-next-line @typescript-eslint/no-var-requires
var path = require('path');

module.exports = function (wallaby) {
  process.env.NODE_PATH += path.delimiter + path.join(wallaby.projectCacheDir, 'src');

  return {
    files: ['src/**/*.ts', 'src/**/*.tsx', '!src/**/*.test.ts?(x)'],
    tests: ['src/**/*.test.ts?(x)'],
    env: {
      type: 'node',
      NODE_ENV: 'test',
      BASE_URL: 'http://localhost:3000'
    },
    testFramework: 'mocha',
    compilers: {
      '**/*.ts?(x)': wallaby.compilers.babel({
        presets: ['next/babel'],
        plugins: [
          ['@babel/plugin-proposal-decorators', { legacy: true }],
          ['@babel/plugin-proposal-class-properties', { loose: true }]
        ]
      })
    },
    delays: {
      run: 1000
    },
    workers: {
      initial: 1,
      regular: 1
    },
    reportUnhandledPromises: true,
    setup: function (wallaby) {
-     wallaby.delayStart();
-     var delayed = false;
      require.extensions['.css'] = () => {
        /* */
      };

      if (!global.db) {
-       delayed = true;
+       wallaby.delayStart();
        console.log('Spinning new db');
        require('apollo-connector-mongodb/dist/testing')
          .getDb()
          .then(db => {
            console.log('Started new database instance!');
            global.db = db;
            wallaby.start();
          });
        console.log('Starting new database instance!');
      }

      if (!global.document) {
        // eslint-disable-next-line @typescript-eslint/no-var-requires
        global.jsdom = require('jsdom-global')(undefined, {
          url: 'http://localhost'
        });
      }

      const mocha = wallaby.testFramework;
      mocha.suite.on('pre-require', function () {
        require(wallaby.projectCacheDir + '/src/mocha.config');

        const cleanup = require('@testing-library/react').cleanup;
        afterEach(cleanup);
      });

-     if (!delayed) {
-       wallaby.start();
-     }
    },
    teardown: function (wallaby) {
      // console.log(global.db);
      // global.db.stop();
      console.log('Database Teardown ..');
      // global.jsdom();
    }
  };
};