feat(suite): allow calling hook methods
PR Checklist
- [x] Addresses an existing open issue: fixes #000
- [x] That issue was marked as
status: accepting prs - [x] Steps in CONTRIBUTING.md were taken
Overview
Closes https://github.com/mochajs/mocha/issues/5202
It seems the only reason this wasn't supported was simply the return value of calling beforeAll, etc, was not the hook itself, unlike the result of calling a function like describe, which does use the suite as the return value.
I will look into adding tests and maybe some docs
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: perrin4869 / name: Julian Grinblat (e599ff107a2a0b7bea8f501382144a54f51df91a, 2b4b3c1869731cc7447449cca1c4b062e9c9a564, a78374d8fdabda9901a9c55b6c851351d94fa85a, aae63ffbf19adc6a390008b005a1e8a16888c133, 060c86da01a5fda292e1bbc8c10e7fccd6cfacf2, 7948b1dc863d54999d7720d9ee9eb2b221ff5273)
- [x] Addresses an existing open issue: fixes #000 ... Closes #5202
By the way, a tip: the template has a place to put the Closes #5202. 🙂
I edited it in just now.
oh oops, sorry about that 😅 thanks for editing! hm... maybe the failure is a flakey test here?
Looks like it! I re-ran the CI job and it's all passing. Phew 😄
was getting worried there for a sec!