Skip to content

Commit

Permalink
Addressed minor comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-baradwaj committed Feb 16, 2024
1 parent 805b014 commit 99457c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions lib/collection/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ _.assign(Script.prototype, /** @lends Script.prototype */ {
*/
this.type = options.type || 'text/javascript';

/**
* @type {Object}
*/
this.packages = options.packages || {};

_.has(options, 'src') && (
Expand Down
3 changes: 1 addition & 2 deletions test/unit/collection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ describe('Collection', function () {
script: {
id: 'my-script-1',
type: 'text/javascript',
exec: ['console.log("This doesn\'t matter");'],
packages: {}
exec: ['console.log("This doesn\'t matter");']
}
}]
},
Expand Down
6 changes: 3 additions & 3 deletions test/unit/event-list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('EventList', function () {
script: {
type: 'text/javascript',
exec: 'console.log("hello");',
packages: [{ id: 'script-package-1', name: 'package1' }]
packages: { package1: { id: 'script-package-1' } }
}
}];

Expand Down Expand Up @@ -49,7 +49,7 @@ describe('EventList', function () {
id: 'test-script-1',
type: 'text/javascript',
exec: ['console.log("hello");'],
packages: { package1: { id: 'script-apckage-1' } }
packages: { package1: { id: 'script-package-1' } }
}
}]);

Expand All @@ -67,7 +67,7 @@ describe('EventList', function () {
id: 'test-script-1',
type: 'text/javascript',
exec: ['console.log("hello");'],
packages: { package1: { id: 'script-apckage-1' } }
packages: { package1: { id: 'script-package-1' } }
}
});

Expand Down

0 comments on commit 99457c4

Please sign in to comment.