testplane icon indicating copy to clipboard operation
testplane copied to clipboard

feat: Use mocha.loadFilesAsync to support ESM

Open Hypnosphi opened this issue 3 years ago • 3 comments

This enables writing test files as ES modules. See also https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

Hypnosphi avatar Oct 14 '21 16:10 Hypnosphi

Hello. Thank you. I will test it today.

DudaGod avatar Oct 15 '21 08:10 DudaGod

I tested these changes. Works seamlessly on a test project, but fails on our big project with thousands tests. I will look at the problem that has arisen.

DudaGod avatar Oct 18 '21 09:10 DudaGod

Hermione can't read test files asynchronously because of global hermione object. Test API provided by this object will work incorrectly:

  • skips
  • only
  • config overriding

j0tunn avatar Apr 14 '22 09:04 j0tunn

Closing in favor of:

  • https://github.com/gemini-testing/hermione/pull/670
  • https://github.com/gemini-testing/hermione/pull/671
  • https://github.com/gemini-testing/mocha/pull/10 + https://github.com/gemini-testing/hermione/pull/673

j0tunn avatar Oct 28 '22 12:10 j0tunn