Skip to content

Update to Mocha@5.x for better debugging, `--inspect`

Eric Eastwood requested to merge upgrade-mocha into develop

Update to Mocha@5.x for better debugging, --inspect

I upgraded so we have access to the Node inspector args, --inspect, --inspect-brk, https://nodejs.org/en/docs/guides/debugging-getting-started/

This worked previously because Mocha would force exit but this changed in Mocha v4, https://boneskull.com/mocha-v4-nears-release/#mochawontforceexit

  • Add --exit arg to get previous force exit functionality
  • Fix overspecified specs with done and returning promises, Error: Resolution method is overspecified. Specify a callback *or* return a Promise; not both.
  • Remove empty test/ directories because Mocha v5 will exit 1, No test files found (previously would exit 0)
  • MISSING IN THIS MR: fixtureLoader.ensureIntegrationEnvironment not properly skipping was added in, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1077#note_90402958

Related Mocha 5 upgrade, https://gitlab.com/gitlab-org/gitter/gitter-webhooks-handler/merge_requests/7, https://gitlab.com/gitlab-org/gitter/gitter-webhooks-handler/merge_requests/13

Edited by 🤖 GitLab Bot 🤖

Merge request reports