Linting fixes to improve quality report

This commit is contained in:
Kshitij Sobti
2018-07-16 13:39:38 +05:30
parent bf6af13ed1
commit fcff921fdb
16 changed files with 32 additions and 35 deletions

View File

@@ -145,10 +145,10 @@ function($, Backbone, _, Utils, Editor, MetadataView, MetadataModel, MetadataCol
'check',
component_locator,
[
{ mode: 'youtube', video: '12345678901', type: 'youtube' },
{ mode: 'html5', video: 'video', type: 'mp4' },
{ mode: 'html5', video: 'video', type: 'webm' },
{ mode: 'edx_video_id', type: 'edx_video_id', video: 'basic tab video id' }
{mode: 'youtube', video: '12345678901', type: 'youtube'},
{mode: 'html5', video: 'video', type: 'mp4'},
{mode: 'html5', video: 'video', type: 'webm'},
{mode: 'edx_video_id', type: 'edx_video_id', video: 'basic tab video id'}
]
);
}).always(done);

View File

@@ -116,7 +116,7 @@ function($, _, Backbone, TranscriptUtils, FileUploader) {
expect(view.$form.ajaxSubmit).toHaveBeenCalled();
expect(view.$form.ajaxSubmit).toHaveBeenCalledWith(jasmine.objectContaining({
data: {'edx_video_id': videoId}
data: {edx_video_id: videoId}
}));
});
});

View File

@@ -184,7 +184,6 @@ function($, _, Backbone, Utils, MessageManager, FileUploader, sinon) {
};
it('Invoke without extraParamas', function(done) {
spyOn(Backbone, 'trigger');
sinonXhr.respondWith([
@@ -213,7 +212,6 @@ function($, _, Backbone, Utils, MessageManager, FileUploader, sinon) {
});
it('Invoke with extraParamas', function(done) {
spyOn(Backbone, 'trigger');
sinonXhr.respondWith([

View File

@@ -216,7 +216,8 @@ function($, _, Backbone, AjaxHelpers, Utils, Editor, VideoList, MetadataModel, A
it('Initialize', function(done) {
var view = createVideoListView(this.mockServer), callArgs;
var view = createVideoListView(this.mockServer),
callArgs;
waitsForResponse(this.mockServer)
.then(function() {
expect(abstractEditor.initialize).toHaveBeenCalled();

View File

@@ -76,7 +76,6 @@ define(['jquery', 'underscore', 'gettext', 'js/views/modals/base_modal', 'jquery
},
upload: function(e) {
var uploadAjaxData = _.extend({}, this.uploadData);
// don't show the generic error notification; we're in a modal,
// and we're better off modifying it instead.

View File

@@ -58,7 +58,7 @@ function($, Backbone, _, TranscriptUtils) {
*/
upload: function() {
var data = {
'edx_video_id': TranscriptUtils.Storage.get('edx_video_id') || ''
edx_video_id: TranscriptUtils.Storage.get('edx_video_id') || ''
};
if (!this.file) {