The Womack Dictionarius word of the day is Thennable (sometimes spelled thenable).
There are two primary cases of this word. I’ve provided example sentences for each case:
Case 1 ~ Adjective
Is the return value of
API.getDictionariusEntries()thennable? I want to try
Case 2 ~ Noun
Each of the methods of the
APIobject are Thennables. We feel this is a good convention for any async-heavy networking object.
You may ask “why do we need the word/concept thennable given we already have the word/concept
Now I could have used a spied-on
Promise in that test. But the experienced unit tester knows they should write the simplest, fastest test that will satisfy the requirements. A
Thennable takes up less CPU cycles, less memory and more accurately reflects the requirements of the function than a
Promise instance would.
May the “then” last forever!
Until next time in The Womack Dictionarius—keep on “thenning”.