3
3
Fork 0

redundant Promise.then usage #14

Geschlossen
2018-07-27 23:03:36 +00:00 geöffnet von Ghost · 7 Kommentare

https://git.coolaj86.com/coolaj86/greenlock.js/src/branch/master/lib/core.js#L439

Doing

promise.then(function (results) {
  return results;
})

Is redundant, without that clause the promise will already resolve to results.

https://git.coolaj86.com/coolaj86/greenlock.js/src/branch/master/lib/core.js#L439 Doing ``` promise.then(function (results) { return results; }) ``` Is redundant, without that clause the promise will already resolve to `results`.
Besitzer

Correct, this is safe to remove.

It's probably leftover from some debugging or a transformation of data, or a control flow branch that was removed.

I'll leave this open to remind me to take care of that.

Correct, this is safe to remove. It's probably leftover from some debugging or a transformation of data, or a control flow branch that was removed. I'll leave this open to remind me to take care of that.
Autor

AJ - do you have any objections to adding jest in for unit testing? I know this is a trivial change but that makes it useful for proving test automation.

Your hand rolled test code keeps things simple but I appreciate the extra info that using a framework provides.

AJ - do you have any objections to adding jest in for unit testing? I know this is a trivial change but that makes it useful for proving test automation. Your hand rolled test code keeps things simple but I appreciate the extra info that using a framework provides.
Autor

(btw - what the target minimum node level? I am working with 8 but tend to babel compile from 7+.)

Happy to create a pull request for this one, with or without jest

(btw - what the target minimum node level? I am working with 8 but tend to babel compile from 7+.) Happy to create a pull request for this one, with or without jest
Besitzer

No objections.

No objections.
Besitzer

Thank you, btw.

Thank you, btw.
Autor

Sorry about delay - I got stuck trying to wire a test around it. Not sure how to best test? Do you generally point it at the sandbox on an internet IP for testing?

Sorry about delay - I got stuck trying to wire a test around it. Not sure how to best test? Do you generally point it at the sandbox on an internet IP for testing?
Besitzer

@chanoch Yes. I create a temporary digital ocean vps and point four test domains at it and run through a few different scenarios.

Then I deploy it to git.coolaj86.com and a possibly a few other sites to see if it works in my existing setups as well.

@chanoch Yes. I create a temporary digital ocean vps and point four test domains at it and run through a few different scenarios. Then I deploy it to git.coolaj86.com and a possibly a few other sites to see if it works in my existing setups as well.
coolaj86 hat diesen Issue 2019-02-05 05:15:18 +00:00 geschlossen
Anmelden, um an der Diskussion teilzunehmen.
Kein Label
Kein Meilenstein
Niemand zuständig
2 Beteiligte
Nachrichten
Fällig am
Das Fälligkeitsdatum ist ungültig oder außerhalb des zulässigen Bereichs. Bitte verwende das Format „jjjj-mm-tt“.

Kein Fälligkeitsdatum gesetzt.

Abhängigkeiten

Keine Abhängigkeiten gesetzt.

Referenz: coolaj86/greenlock.js-ARCHIVED#14
Keine Beschreibung angegeben.