5 ms·
I like the async hook idea. But I’m having a hard time imagining his unit tests would work?
by moltar 8y ago
I like the async hook idea. But I’m having a hard time imagining his unit tests would work?
- tytho 8y agoI worked on a codebase that used the old "domains" this way, and it was very kludgy. We could get unit tests working, but we essentially mocked calling that 'set' method before the function we were testing used it. We eventually ripped it all out in favor of explicitly passing arguments down the async chain because we found that for some reason those "magic" variables were leaking across requests. Could have been another factor that caused it, but the magic was too much for us.