Last active
December 30, 2015 18:19
-
-
Save tatey/7867043 to your computer and use it in GitHub Desktop.
You *can* have nested describes in Jasmine.
This file contains hidden or 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('util.Config', function() { | |
describe('.openerType', function() { | |
var Config, Device; | |
beforeEach(function() { | |
Device = {}; | |
Config = theBestDay.require('widget.Config', {'util.Device': Device}); | |
}); | |
describe('desktop', function() { | |
beforeEach(function() { | |
Device.isMobile = function() { return false; }; | |
}); | |
it('defaults to config', function() { | |
var url = Config.childUrl(); | |
expect(url).toBe('<%= site.config["child"]["desktop_url"] %>'); | |
}); | |
it('is given child URL', function() { | |
var url = Config.childUrl({mobile: '/mobile', desktop: '/desktop'}); | |
expect(url).toBe('/desktop'); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment