Skip to content

Instantly share code, notes, and snippets.

@Hitman666
Created September 14, 2016 11:07
Show Gist options
  • Save Hitman666/5fd5af0e78d512f8502eac1698580385 to your computer and use it in GitHub Desktop.
Save Hitman666/5fd5af0e78d512f8502eac1698580385 to your computer and use it in GitHub Desktop.
performSearch(searchTerm: string): string {
console.log(`User unio: ${searchTerm}`);
return searchTerm;
}
it('should have a function performSearch',
inject([AppComponent], (app: AppComponent) => {
expect(app.performSearch).toBeTruthy();
}));
it('should have a function performSearch return the passed in text',
inject([AppComponent], (app: AppComponent) => {
let a = app.performSearch('expect unexpected');
console.log(a);
expect(a).toEqual('expect unexpected');
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment