Skip to content

Instantly share code, notes, and snippets.

@dalemanthei
Last active January 24, 2016 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalemanthei/16231969da7f9177be7f to your computer and use it in GitHub Desktop.
Save dalemanthei/16231969da7f9177be7f to your computer and use it in GitHub Desktop.
A Jasmine beforeEach function to get a filter for testing
var myFilter;
beforeEach(function () {
module('myModule');
inject(function ($injector) {
myFilter = $injector.get('$filter')('myFilter');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment