Can anyone suggest a way to mock or stub an `exter...
# javascript
s
Can anyone suggest a way to mock or stub an
external class
so that code that uses them can be unit tested?
j
You could extract an interface so that arbitrary implementations (like fakes) can be used for testing.
s
That was my fallback plan in case nobody had a clever trick. Thanks!