Skip to content

Instantly share code, notes, and snippets.

Working from home

Joshua V Sherman JoshuaVSherman

Working from home
Block or report user

Report or block JoshuaVSherman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
JoshuaVSherman / gist:454704d7fc3fa2fa407263fd8c4aa1ee
Last active Jan 21, 2017
How to Unit Test a Function that Overwrites an Aurelia Component
View gist:454704d7fc3fa2fa407263fd8c4aa1ee

To cover this particular function one needs to call app.configHttpClient() either directly, or by calling app.activate().

The httpClient is aurelia's fetch wrapper (docs: which is initialized in the App's constructor.

By default it's @injected by aurelia

import {inject} from 'aurelia-framework';
import {HttpClient} from 'aurelia-fetch-client';
You can’t perform that action at this time.