Last active
August 29, 2015 14:24
-
-
Save lewiscowper/5358cbfb79a1984c39f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('on load', function () { | |
describe('the foo variable', function () { | |
it('should be defined', function () { | |
expect(_scope.foo).toBeDefined(); | |
}); | |
it('should be set correctly', function () { | |
expect(_scope.foo).toBe(false); | |
}); | |
}); | |
describe('the bar variable', function () { | |
it('should be defined', function () { | |
expect(_scope.bar).toBeDefined(); | |
}); | |
it('should be set correctly', function () { | |
expect(_scope.bar).toBe(true); | |
}); | |
}); | |
describe('the qux function', function () { | |
it('should be defined', function () { | |
expect(_scope.qux).toBeDefined(); | |
}); | |
it('should be of type function', function () { | |
expect(typeof _scope.qux).toBe('function'); | |
}); | |
it('should return the correct value', function () { | |
expect(_scope.qux()).toBe(false); | |
}); | |
}); | |
describe('the baz object', function () { | |
it('should be defined', function () { | |
expect(_scope.baz).toBeDefined(); | |
}); | |
it('should be of type object', function () { | |
expect(typeof _scope.baz).toBe('object'); | |
}); | |
it('should have a fred property', function () { | |
expect(_scope.baz.hasOwnProperty('fred')).toBe(true); | |
}); | |
describe('the fred property', function () { | |
it('should be set correctly', function () { | |
expect(_scope.baz.fred).toEqual(3); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment