mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
added spec for auto bootstrap with #autobind
This commit is contained in:
parent
257e97a65f
commit
264f960800
1 changed files with 14 additions and 0 deletions
|
|
@ -255,6 +255,20 @@ describe('angularJsConfig', function() {
|
|||
});
|
||||
|
||||
|
||||
it('should extract angular autobind config from the script hashpath attributes', function() {
|
||||
var doc = { getElementsByTagName: function(tagName) {
|
||||
expect(lowercase(tagName)).toEqual('script');
|
||||
return [{nodeName: 'SCRIPT',
|
||||
src: 'angularjs/angular.js#autobind'}];
|
||||
}};
|
||||
|
||||
expect(angularJsConfig(doc)).toEqual({base_url: 'angularjs/',
|
||||
autobind: true,
|
||||
ie_compat: 'angularjs/angular-ie-compat.js',
|
||||
ie_compat_id: 'ng-ie-compat'});
|
||||
});
|
||||
|
||||
|
||||
it("should default to versioned ie-compat file if angular file is versioned", function() {
|
||||
var doc = { getElementsByTagName: function(tagName) {
|
||||
expect(lowercase(tagName)).toEqual('script');
|
||||
|
|
|
|||
Loading…
Reference in a new issue