question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rename `beforeAll/afterAll` to `pre/post`?

See original GitHub issue

Hey, 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:open
  • Created 5 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
chrisdmacraecommented, Jun 5, 2018

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

2reactions
ianstormtaylorcommented, Jun 4, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found