Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
227f5f0
commit 3dd79e1
Showing
4 changed files
with
40 additions
and
11 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
var CacheWithInitialization = ElCacheo.Cache.extend({ | ||
initialize: function (cache, options) { | ||
this.passedInCache = cache; | ||
this.passedInOptions = options; | ||
} | ||
}); | ||
|
||
var initialCache = { | ||
'body': $('body') | ||
}; | ||
|
||
var initialOptions = { | ||
someOption: "someOption's value" | ||
}; | ||
|
||
var cacheWithInitialization = new CacheWithInitialization(initialCache, initialOptions); | ||
|
||
describe('a cache with initialization', function () { | ||
it('should have a passedInCache property', function () { | ||
expect(cacheWithInitialization.passedInCache).toBeDefined(); | ||
}); | ||
|
||
it('should have a passedInCache property equal to initialCache', function () { | ||
expect(cacheWithInitialization.passedInCache).toEqual(initialCache); | ||
}); | ||
|
||
it('should have a passedInOptions property', function () { | ||
expect(cacheWithInitialization.passedInOptions).toBeDefined(); | ||
}); | ||
|
||
it('should have a passedInOptions property equal to initialOptions', function () { | ||
expect(cacheWithInitialization.passedInOptions).toEqual(initialOptions); | ||
}); | ||
}); |
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
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