Skip to content

Commit 9056d38

Browse files
author
Emmanouil Konstantinidis
committed
Fix tests
1 parent 17775b2 commit 9056d38

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

src/js/__tests__/components/notification.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ describe('Test for Notification Component', function () {
3434
item: false,
3535
getItem: function () {
3636
return this.item;
37+
},
38+
setItem: function (item) {
39+
this.item = item;
3740
}
3841
};
3942

src/js/__tests__/components/notifications.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ describe('Test for Notifications Component', function () {
3434
item: false,
3535
getItem: function () {
3636
return this.item;
37+
},
38+
setItem: function (item) {
39+
this.item = item;
3740
}
3841
};
3942

src/js/__tests__/components/settings.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ describe('Test for Settings Component', function () {
2828
item: false,
2929
getItem: function () {
3030
return this.item;
31+
},
32+
setItem: function (item) {
33+
this.item = item;
3134
}
3235
};
3336

src/js/__tests__/stores/notifications.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,26 @@ describe('Tests for NotificationsStore', function () {
2727
item: false,
2828
getItem: function () {
2929
return this.item;
30+
},
31+
setItem: function (item) {
32+
this.item = item;
3033
}
3134
};
3235

3336
// Mock Audio
34-
window.Audio = function (src) {
35-
console.log('Loading Audio: ' + src);
37+
window.Audio = function () {
3638
return {
3739
play: function () {}
3840
};
3941
};
4042

43+
// Mock Notifications
44+
window.Notification = function () {
45+
return {
46+
onClick: function () {}
47+
};
48+
};
49+
4150
Actions = require('../../actions/actions.js');
4251
apiRequests = require('../../utils/api-requests.js');
4352
NotificationsStore = require('../../stores/notifications.js');

0 commit comments

Comments
 (0)