mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
### What is this PR for? This PR replace JsHint with Eslint, the original configuration was ported from jsHint using [Polyjuice](https://www.npmjs.com/package/polyjuice), then the settings were tuned to match exactly. For this PR, the goal is not to add new rules, but only to replace the system with the same rules. ### What type of PR is it? Improvement ### Todos * [x] - Remove .jshintrc ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1089 ### How should this be tested? You can simply build the code. You can try to add an unused variable in the js code to see an error. ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Damien CORNEAU <[email protected]> Closes #1204 from corneadoug/ZEPPELIN-1089 and squashes the following commits:6cf1e2a[Damien CORNEAU] fix $ is missing errore71389d[Damien CORNEAU] remove jshint remnantse1b389f[Damien CORNEAU] remove .jsintrc0364ad4[Damien CORNEAU] Fix eslint for tests7b1da05[Damien CORNEAU] Replace JsHint by Eslint
31 lines
834 B
JavaScript
31 lines
834 B
JavaScript
'use strict';
|
|
|
|
describe('Controller: MainCtrl', function() {
|
|
beforeEach(module('zeppelinWebApp'));
|
|
|
|
var scope;
|
|
var rootScope;
|
|
|
|
beforeEach(inject(function($controller, $rootScope) {
|
|
rootScope = $rootScope;
|
|
scope = $rootScope.$new();
|
|
$controller('MainCtrl', {
|
|
$scope: scope
|
|
});
|
|
}));
|
|
|
|
it('should attach "asIframe" to the scope and the default value should be false', function() {
|
|
expect(scope.asIframe).toBeDefined();
|
|
expect(scope.asIframe).toEqual(false);
|
|
});
|
|
|
|
it('should set the default value of "looknfeel to "default"', function() {
|
|
expect(scope.looknfeel).toEqual('default');
|
|
});
|
|
|
|
it('should set "asIframe" flag to true when a controller broadcasts setIframe event', function() {
|
|
rootScope.$broadcast('setIframe', true);
|
|
expect(scope.asIframe).toEqual(true);
|
|
});
|
|
|
|
});
|