Join Slack
Powered by
Can anyone suggest a way to mock or stub an `exter...
# javascript
s
Samuel Cook
11/01/2019, 12:40 AM
Can anyone suggest a way to mock or stub an
external class
so that code that uses them can be unit tested?
j
jw
11/01/2019, 12:44 AM
You could extract an interface so that arbitrary implementations (like fakes) can be used for testing.
s
Samuel Cook
11/01/2019, 4:03 PM
That was my fallback plan in case nobody had a clever trick. Thanks!
8
Views
Open in Slack
Previous
Next