@@ -239,9 +239,8 @@ describe('squad featured updated notification', () => {
239239 } ) ;
240240
241241 it ( 'should be registered' , async ( ) => {
242- const worker = await import (
243- '../../src/workers/notifications/squadFeaturedUpdated'
244- ) ;
242+ const worker =
243+ await import ( '../../src/workers/notifications/squadFeaturedUpdated' ) ;
245244
246245 const registeredWorker = workers . find (
247246 ( item ) => item . subscription === worker . default . subscription ,
@@ -251,9 +250,8 @@ describe('squad featured updated notification', () => {
251250 } ) ;
252251
253252 it ( 'should not do anything when squad is not featured' , async ( ) => {
254- const worker = await import (
255- '../../src/workers/notifications/squadFeaturedUpdated'
256- ) ;
253+ const worker =
254+ await import ( '../../src/workers/notifications/squadFeaturedUpdated' ) ;
257255 const actual =
258256 await invokeTypedNotificationWorker < 'api.v1.squad-featured-updated' > (
259257 worker . default ,
@@ -265,9 +263,8 @@ describe('squad featured updated notification', () => {
265263 } ) ;
266264
267265 it ( 'should send notification to admins' , async ( ) => {
268- const worker = await import (
269- '../../src/workers/notifications/squadFeaturedUpdated'
270- ) ;
266+ const worker =
267+ await import ( '../../src/workers/notifications/squadFeaturedUpdated' ) ;
271268 const actual =
272269 await invokeTypedNotificationWorker < 'api.v1.squad-featured-updated' > (
273270 worker . default ,
@@ -292,9 +289,8 @@ describe('squad featured updated notification', () => {
292289 } ) ;
293290
294291 it ( 'should send notification to moderators' , async ( ) => {
295- const worker = await import (
296- '../../src/workers/notifications/squadFeaturedUpdated'
297- ) ;
292+ const worker =
293+ await import ( '../../src/workers/notifications/squadFeaturedUpdated' ) ;
298294 const actual =
299295 await invokeTypedNotificationWorker < 'api.v1.squad-featured-updated' > (
300296 worker . default ,
@@ -319,9 +315,8 @@ describe('squad featured updated notification', () => {
319315 } ) ;
320316
321317 it ( 'should not send notification to regular members' , async ( ) => {
322- const worker = await import (
323- '../../src/workers/notifications/squadFeaturedUpdated'
324- ) ;
318+ const worker =
319+ await import ( '../../src/workers/notifications/squadFeaturedUpdated' ) ;
325320 const actual =
326321 await invokeTypedNotificationWorker < 'api.v1.squad-featured-updated' > (
327322 worker . default ,
@@ -346,9 +341,8 @@ describe('squad featured updated notification', () => {
346341 } ) ;
347342
348343 it ( 'should not send notification to blocked members' , async ( ) => {
349- const worker = await import (
350- '../../src/workers/notifications/squadFeaturedUpdated'
351- ) ;
344+ const worker =
345+ await import ( '../../src/workers/notifications/squadFeaturedUpdated' ) ;
352346 const actual =
353347 await invokeTypedNotificationWorker < 'api.v1.squad-featured-updated' > (
354348 worker . default ,
@@ -984,9 +978,8 @@ describe('post added notifications', () => {
984978
985979describe ( 'post bookmark reminder' , ( ) => {
986980 it ( 'should be registered' , async ( ) => {
987- const worker = await import (
988- '../../src/workers/notifications/postBookmarkReminder'
989- ) ;
981+ const worker =
982+ await import ( '../../src/workers/notifications/postBookmarkReminder' ) ;
990983
991984 const registeredWorker = workers . find (
992985 ( item ) => item . subscription === worker . default . subscription ,
@@ -996,9 +989,8 @@ describe('post bookmark reminder', () => {
996989 } ) ;
997990
998991 it ( 'should add notification for the user that set the reminder' , async ( ) => {
999- const worker = await import (
1000- '../../src/workers/notifications/postBookmarkReminder'
1001- ) ;
992+ const worker =
993+ await import ( '../../src/workers/notifications/postBookmarkReminder' ) ;
1002994 const remindAt = new Date ( ) ;
1003995 await con
1004996 . getRepository ( Bookmark )
@@ -1024,9 +1016,8 @@ describe('post bookmark reminder', () => {
10241016 } ) ;
10251017
10261018 it ( 'should not add notification if the reminder has been removed' , async ( ) => {
1027- const worker = await import (
1028- '../../src/workers/notifications/postBookmarkReminder'
1029- ) ;
1019+ const worker =
1020+ await import ( '../../src/workers/notifications/postBookmarkReminder' ) ;
10301021 await con . getRepository ( Bookmark ) . save ( { userId : '1' , postId : 'p1' } ) ;
10311022 const actual =
10321023 await invokeTypedNotificationWorker < 'api.v1.post-bookmark-reminder' > (
@@ -1040,9 +1031,8 @@ describe('post bookmark reminder', () => {
10401031 } ) ;
10411032
10421033 it ( 'should not add notification if the post is not found' , async ( ) => {
1043- const worker = await import (
1044- '../../src/workers/notifications/postBookmarkReminder'
1045- ) ;
1034+ const worker =
1035+ await import ( '../../src/workers/notifications/postBookmarkReminder' ) ;
10461036 const actual =
10471037 await invokeTypedNotificationWorker < 'api.v1.post-bookmark-reminder' > (
10481038 worker . default ,
@@ -1073,9 +1063,8 @@ describe('streak reset restore', () => {
10731063 } ) ;
10741064
10751065 it ( 'should be registered' , async ( ) => {
1076- const worker = await import (
1077- '../../src/workers/notifications/userStreakResetNotification'
1078- ) ;
1066+ const worker =
1067+ await import ( '../../src/workers/notifications/userStreakResetNotification' ) ;
10791068
10801069 const registeredWorker = workers . find (
10811070 ( item ) => item . subscription === worker . default . subscription ,
@@ -1085,9 +1074,8 @@ describe('streak reset restore', () => {
10851074 } ) ;
10861075
10871076 it ( 'should add notification for the user to restore their streak' , async ( ) => {
1088- const worker = await import (
1089- '../../src/workers/notifications/userStreakResetNotification'
1090- ) ;
1077+ const worker =
1078+ await import ( '../../src/workers/notifications/userStreakResetNotification' ) ;
10911079 const lastViewAt = new Date ( ) ;
10921080 const lastStreak = 10 ;
10931081 const streak = await con
@@ -1115,9 +1103,8 @@ describe('streak reset restore', () => {
11151103 } ) ;
11161104
11171105 it ( 'should not add notification if the stored value has expired' , async ( ) => {
1118- const worker = await import (
1119- '../../src/workers/notifications/userStreakResetNotification'
1120- ) ;
1106+ const worker =
1107+ await import ( '../../src/workers/notifications/userStreakResetNotification' ) ;
11211108 const lastViewAt = new Date ( ) ;
11221109 const streak = await con
11231110 . getRepository ( UserStreak )
@@ -1133,9 +1120,8 @@ describe('streak reset restore', () => {
11331120 } ) ;
11341121
11351122 it ( 'should not add notification if the user opted out of streaks' , async ( ) => {
1136- const worker = await import (
1137- '../../src/workers/notifications/userStreakResetNotification'
1138- ) ;
1123+ const worker =
1124+ await import ( '../../src/workers/notifications/userStreakResetNotification' ) ;
11391125 const lastViewAt = new Date ( ) ;
11401126 const lastStreak = 10 ;
11411127 const streak = await con
@@ -1162,9 +1148,8 @@ describe('streak reset restore', () => {
11621148 } ) ;
11631149
11641150 it ( 'should not add notification if the stored value is not a number' , async ( ) => {
1165- const worker = await import (
1166- '../../src/workers/notifications/userStreakResetNotification'
1167- ) ;
1151+ const worker =
1152+ await import ( '../../src/workers/notifications/userStreakResetNotification' ) ;
11681153 const lastViewAt = new Date ( ) ;
11691154 const streak = await con
11701155 . getRepository ( UserStreak )
@@ -1187,9 +1172,8 @@ describe('streak reset restore', () => {
11871172 } ) ;
11881173
11891174 it ( 'should not add notification if user does not have Cores access' , async ( ) => {
1190- const worker = await import (
1191- '../../src/workers/notifications/userStreakResetNotification'
1192- ) ;
1175+ const worker =
1176+ await import ( '../../src/workers/notifications/userStreakResetNotification' ) ;
11931177 const lastViewAt = new Date ( ) ;
11941178 const lastStreak = 10 ;
11951179
@@ -2512,9 +2496,8 @@ describe('user post added', () => {
25122496 } ) ;
25132497
25142498 it ( 'should add notification for author' , async ( ) => {
2515- const { postAddedUserNotification : worker } = await import (
2516- '../../src/workers/notifications/postAddedUserNotification'
2517- ) ;
2499+ const { postAddedUserNotification : worker } =
2500+ await import ( '../../src/workers/notifications/postAddedUserNotification' ) ;
25182501 await con . getRepository ( Post ) . update ( { id : 'p1' } , { authorId : '1' } ) ;
25192502 await con . getRepository ( ContentPreferenceUser ) . save ( [
25202503 {
@@ -2548,9 +2531,8 @@ describe('user post added', () => {
25482531 } ) ;
25492532
25502533 it ( 'should add notification for scout' , async ( ) => {
2551- const { postAddedUserNotification : worker } = await import (
2552- '../../src/workers/notifications/postAddedUserNotification'
2553- ) ;
2534+ const { postAddedUserNotification : worker } =
2535+ await import ( '../../src/workers/notifications/postAddedUserNotification' ) ;
25542536 await con . getRepository ( Post ) . update ( { id : 'p1' } , { scoutId : '1' } ) ;
25552537 await con . getRepository ( ContentPreferenceUser ) . save ( [
25562538 {
@@ -2584,9 +2566,8 @@ describe('user post added', () => {
25842566 } ) ;
25852567
25862568 it ( 'should not add notification for user that are only following' , async ( ) => {
2587- const { postAddedUserNotification : worker } = await import (
2588- '../../src/workers/notifications/postAddedUserNotification'
2589- ) ;
2569+ const { postAddedUserNotification : worker } =
2570+ await import ( '../../src/workers/notifications/postAddedUserNotification' ) ;
25902571 await con . getRepository ( Post ) . update ( { id : 'p1' } , { scoutId : '1' } ) ;
25912572 await con . getRepository ( ContentPreferenceUser ) . save ( [
25922573 {
@@ -2620,9 +2601,8 @@ describe('user post added', () => {
26202601 } ) ;
26212602
26222603 it ( 'should not add notification for private post' , async ( ) => {
2623- const { postAddedUserNotification : worker } = await import (
2624- '../../src/workers/notifications/postAddedUserNotification'
2625- ) ;
2604+ const { postAddedUserNotification : worker } =
2605+ await import ( '../../src/workers/notifications/postAddedUserNotification' ) ;
26262606 const privatePost = await con . getRepository ( Post ) . save ( {
26272607 ...postsFixture [ 0 ] ,
26282608 id : 'p1-upa' ,
@@ -2658,9 +2638,8 @@ describe('user post added', () => {
26582638 } ) ;
26592639
26602640 it ( 'should not add notification for user that muted' , async ( ) => {
2661- const { postAddedUserNotification : worker } = await import (
2662- '../../src/workers/notifications/postAddedUserNotification'
2663- ) ;
2641+ const { postAddedUserNotification : worker } =
2642+ await import ( '../../src/workers/notifications/postAddedUserNotification' ) ;
26642643 await con . getRepository ( Post ) . update ( { id : 'p1' } , { scoutId : '1' } ) ;
26652644 await con . getRepository ( ContentPreferenceUser ) . save ( [
26662645 {
@@ -2700,9 +2679,8 @@ describe('user post added', () => {
27002679 } ) ;
27012680
27022681 it ( 'should only query subscriptions for user post added notification type' , async ( ) => {
2703- const { postAddedUserNotification : worker } = await import (
2704- '../../src/workers/notifications/postAddedUserNotification'
2705- ) ;
2682+ const { postAddedUserNotification : worker } =
2683+ await import ( '../../src/workers/notifications/postAddedUserNotification' ) ;
27062684 await con . getRepository ( Post ) . update ( { id : 'p1' } , { scoutId : '1' } ) ;
27072685 await con . getRepository ( ContentPreferenceUser ) . save ( [
27082686 {
@@ -2776,9 +2754,8 @@ describe('user post added', () => {
27762754 } ) ;
27772755
27782756 it ( 'should not add notification for brief posts' , async ( ) => {
2779- const { postAddedUserNotification : worker } = await import (
2780- '../../src/workers/notifications/postAddedUserNotification'
2781- ) ;
2757+ const { postAddedUserNotification : worker } =
2758+ await import ( '../../src/workers/notifications/postAddedUserNotification' ) ;
27822759 const post = await con . getRepository ( BriefPost ) . save ( {
27832760 ...postsFixture [ 0 ] ,
27842761 id : 'p1-brief-upa' ,
0 commit comments