rename `beforeAll/afterAll` to `pre/post`?
See original GitHub issueHey, thanks for the interesting tool!
I was just gonna make a suggestion. Right now you can have things like postbuild
and prebuild
which run automatically. But the automatic before/after everything is confusingly named afterAll
and beforeAll
, which isn’t consistent.
It might be nice to allow pre
and post
tasks that run before/after everything instead, to stay consistent. It feels natural that pre
without pre{task}
would count for everything.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Setup and Teardown - Jest
By default, the beforeAll and afterAll blocks apply to every test in a file. You can also group tests together using a describe...
Read more >Behave - Quick Guide - Tutorialspoint
Environment Setup files where, the pre/post conditions are to be executed prior ... The steps starting with And/But in the feature file are...
Read more >Changes To rsbackup - The Green End Organisation
The hook directives are renamed, to ( pre , post ) - ( device , volume ) -hook . ... pre-volume-hook is now...
Read more >Getting @BeforeAll and @AfterAll behaviour with Cucumber ...
When testing complex scenarios, sometimes you need to setup an expensive resource before starting the first test and tear it down after the...
Read more >Step 2: Backend | SuperTokens Docs
Add the middleware BEFORE all your routes. ... Add the errorHandler AFTER all your routes, but BEFORE your error handler.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I disagree @ianstormtaylor. It should be plain English. That’s what makes this so interesting.
However it should still be a standard API.
<action> <condition> <target> [target identifier] <runtime params...>
In our case, these are:
run [before|after] [task|all]
Or
run before all
,run after all
@zephraph I’m not sure I totally understand. I think “before anything else runs” and “pre all tasks” are kind of synonymous. I’d personally avoid any of the plain english stuff, since I think it makes the API really hard to remember.