Skip to content

Instantly share code, notes, and snippets.

@ilyachenko
Created December 12, 2015 11:29
Show Gist options
  • Save ilyachenko/90b3aa448d591c353f60 to your computer and use it in GitHub Desktop.
Save ilyachenko/90b3aa448d591c353f60 to your computer and use it in GitHub Desktop.
describe('The test filter', function () {
'use strict';
var $filter;
beforeEach(function () {
module('myTestFilterModule');
inject(function (_$filter_) {
$filter = _$filter_;
});
});
it('should capitalize a string', function () {
// Arrange.
var foo = 'hello world', result;
// Act.
result = $filter('testFilter')(foo, 'capitalize');
// Assert.
expect(result).toEqual('HELLO WORLD');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment