Initial commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Shared tests for a dashboard header view model
|
||||
*
|
||||
* Expected to be called within the scope of the test, e.g.:
|
||||
* describe('./my_header_view_model', function() {}
|
||||
* beforeEach(function() {
|
||||
* this.viewModel = new MyHeaderViewModel({ ... })
|
||||
* });
|
||||
* sharedTests.call(this)
|
||||
*/
|
||||
var REQUIRED_FUNCTIONS = [
|
||||
'breadcrumbTitle',
|
||||
'isBreadcrumbDropdownEnabled',
|
||||
'isDisplayingDatasets',
|
||||
'isDisplayingMaps',
|
||||
'isDisplayingLockedItems'
|
||||
];
|
||||
|
||||
module.exports = function () {
|
||||
REQUIRED_FUNCTIONS.forEach(function (functionName) {
|
||||
it('should have a ' + functionName + 'function', function () {
|
||||
expect(this.viewModel[functionName]).toEqual(jasmine.any(Function));
|
||||
});
|
||||
}, this);
|
||||
};
|
||||
Reference in New Issue
Block a user