@@ -36,7 +36,7 @@ describe("BlocklistDal", () => {
3636 await expect (
3737 BlacklistDal . getCollection ( ) . findOne ( {
3838 emailHash : BlacklistDal . hash ( email ) ,
39- } )
39+ } ) ,
4040 ) . resolves . toMatchObject ( {
4141 emailHash : BlacklistDal . hash ( email ) ,
4242 timestamp : now ,
@@ -45,7 +45,7 @@ describe("BlocklistDal", () => {
4545 await expect (
4646 BlacklistDal . getCollection ( ) . findOne ( {
4747 usernameHash : BlacklistDal . hash ( name ) ,
48- } )
48+ } ) ,
4949 ) . resolves . toMatchObject ( {
5050 usernameHash : BlacklistDal . hash ( name ) ,
5151 timestamp : now ,
@@ -67,7 +67,7 @@ describe("BlocklistDal", () => {
6767 await expect (
6868 BlacklistDal . getCollection ( ) . findOne ( {
6969 discordIdHash : BlacklistDal . hash ( discordId ) ,
70- } )
70+ } ) ,
7171 ) . resolves . toMatchObject ( {
7272 discordIdHash : BlacklistDal . hash ( discordId ) ,
7373 timestamp : now ,
@@ -92,21 +92,21 @@ describe("BlocklistDal", () => {
9292 . find ( {
9393 usernameHash : BlacklistDal . hash ( name ) ,
9494 } )
95- . toArray ( )
95+ . toArray ( ) ,
9696 ) . resolves . toHaveLength ( 1 ) ;
9797 await expect (
9898 BlacklistDal . getCollection ( )
9999 . find ( {
100100 emailHash : BlacklistDal . hash ( email ) ,
101101 } )
102- . toArray ( )
102+ . toArray ( ) ,
103103 ) . resolves . toHaveLength ( 1 ) ;
104104 await expect (
105105 BlacklistDal . getCollection ( )
106106 . find ( {
107107 emailHash : BlacklistDal . hash ( email2 ) ,
108108 } )
109- . toArray ( )
109+ . toArray ( ) ,
110110 ) . resolves . toHaveLength ( 1 ) ;
111111 } ) ;
112112 it ( "adds user should not create duplicate email" , async ( ) => {
@@ -128,7 +128,7 @@ describe("BlocklistDal", () => {
128128 . find ( {
129129 emailHash : BlacklistDal . hash ( email ) ,
130130 } )
131- . toArray ( )
131+ . toArray ( ) ,
132132 ) . resolves . toHaveLength ( 1 ) ;
133133 } ) ;
134134 it ( "adds user should not create duplicate discordId" , async ( ) => {
@@ -153,7 +153,7 @@ describe("BlocklistDal", () => {
153153 . find ( {
154154 discordIdHash : BlacklistDal . hash ( discordId ) ,
155155 } )
156- . toArray ( )
156+ . toArray ( ) ,
157157 ) . resolves . toHaveLength ( 1 ) ;
158158 } ) ;
159159 } ) ;
@@ -170,33 +170,33 @@ describe("BlocklistDal", () => {
170170 //by name
171171 await expect ( BlacklistDal . contains ( { name } ) ) . resolves . toBeTruthy ( ) ;
172172 await expect (
173- BlacklistDal . contains ( { name : name . toUpperCase ( ) } )
173+ BlacklistDal . contains ( { name : name . toUpperCase ( ) } ) ,
174174 ) . resolves . toBeTruthy ( ) ;
175175 await expect (
176- BlacklistDal . contains ( { name, email : "unknown" , discordId : "unknown" } )
176+ BlacklistDal . contains ( { name, email : "unknown" , discordId : "unknown" } ) ,
177177 ) . resolves . toBeTruthy ( ) ;
178178
179179 //by email
180180 await expect ( BlacklistDal . contains ( { email } ) ) . resolves . toBeTruthy ( ) ;
181181 await expect (
182- BlacklistDal . contains ( { email : email . toUpperCase ( ) } )
182+ BlacklistDal . contains ( { email : email . toUpperCase ( ) } ) ,
183183 ) . resolves . toBeTruthy ( ) ;
184184 await expect (
185- BlacklistDal . contains ( { name : "unknown" , email, discordId : "unknown" } )
185+ BlacklistDal . contains ( { name : "unknown" , email, discordId : "unknown" } ) ,
186186 ) . resolves . toBeTruthy ( ) ;
187187
188188 //by discordId
189189 await expect ( BlacklistDal . contains ( { discordId } ) ) . resolves . toBeTruthy ( ) ;
190190 await expect (
191- BlacklistDal . contains ( { discordId : discordId . toUpperCase ( ) } )
191+ BlacklistDal . contains ( { discordId : discordId . toUpperCase ( ) } ) ,
192192 ) . resolves . toBeTruthy ( ) ;
193193 await expect (
194- BlacklistDal . contains ( { name : "unknown" , email : "unknown" , discordId } )
194+ BlacklistDal . contains ( { name : "unknown" , email : "unknown" , discordId } ) ,
195195 ) . resolves . toBeTruthy ( ) ;
196196
197197 //by name and email and discordId
198198 await expect (
199- BlacklistDal . contains ( { name, email, discordId } )
199+ BlacklistDal . contains ( { name, email, discordId } ) ,
200200 ) . resolves . toBeTruthy ( ) ;
201201 } ) ;
202202 it ( "does not contain user" , async ( ) => {
@@ -206,20 +206,20 @@ describe("BlocklistDal", () => {
206206
207207 //WHEN / THEN
208208 await expect (
209- BlacklistDal . contains ( { name : "unknown" } )
209+ BlacklistDal . contains ( { name : "unknown" } ) ,
210210 ) . resolves . toBeFalsy ( ) ;
211211 await expect (
212- BlacklistDal . contains ( { email : "unknown" } )
212+ BlacklistDal . contains ( { email : "unknown" } ) ,
213213 ) . resolves . toBeFalsy ( ) ;
214214 await expect (
215- BlacklistDal . contains ( { discordId : "unknown" } )
215+ BlacklistDal . contains ( { discordId : "unknown" } ) ,
216216 ) . resolves . toBeFalsy ( ) ;
217217 await expect (
218218 BlacklistDal . contains ( {
219219 name : "unknown" ,
220220 email : "unknown" ,
221221 discordId : "unknown" ,
222- } )
222+ } ) ,
223223 ) . resolves . toBeFalsy ( ) ;
224224
225225 await expect ( BlacklistDal . contains ( { } ) ) . resolves . toBeFalsy ( ) ;
@@ -243,10 +243,10 @@ describe("BlocklistDal", () => {
243243
244244 //decoy still exists
245245 await expect (
246- BlacklistDal . contains ( { name : "test" } )
246+ BlacklistDal . contains ( { name : "test" } ) ,
247247 ) . resolves . toBeTruthy ( ) ;
248248 await expect (
249- BlacklistDal . contains ( { email :
"[email protected] " } ) 249+ BlacklistDal . contains ( { email :
"[email protected] " } ) , 250250 ) . resolves . toBeTruthy ( ) ;
251251 } ) ;
252252 it ( "removes existing email" , async ( ) => {
@@ -265,10 +265,10 @@ describe("BlocklistDal", () => {
265265
266266 //decoy still exists
267267 await expect (
268- BlacklistDal . contains ( { name : "test" } )
268+ BlacklistDal . contains ( { name : "test" } ) ,
269269 ) . resolves . toBeTruthy ( ) ;
270270 await expect (
271- BlacklistDal . contains ( { email :
"[email protected] " } ) 271+ BlacklistDal . contains ( { email :
"[email protected] " } ) , 272272 ) . resolves . toBeTruthy ( ) ;
273273 } ) ;
274274 it ( "removes existing discordId" , async ( ) => {
@@ -293,13 +293,13 @@ describe("BlocklistDal", () => {
293293
294294 //decoy still exists
295295 await expect (
296- BlacklistDal . contains ( { name : "test" } )
296+ BlacklistDal . contains ( { name : "test" } ) ,
297297 ) . resolves . toBeTruthy ( ) ;
298298 await expect (
299- BlacklistDal . contains ( { email :
"[email protected] " } ) 299+ BlacklistDal . contains ( { email :
"[email protected] " } ) , 300300 ) . resolves . toBeTruthy ( ) ;
301301 await expect (
302- BlacklistDal . contains ( { discordId : "testDiscordId" } )
302+ BlacklistDal . contains ( { discordId : "testDiscordId" } ) ,
303303 ) . resolves . toBeTruthy ( ) ;
304304 } ) ;
305305 it ( "removes existing username,email and discordId" , async ( ) => {
@@ -324,13 +324,13 @@ describe("BlocklistDal", () => {
324324
325325 //decoy still exists
326326 await expect (
327- BlacklistDal . contains ( { name : "test" } )
327+ BlacklistDal . contains ( { name : "test" } ) ,
328328 ) . resolves . toBeTruthy ( ) ;
329329 await expect (
330- BlacklistDal . contains ( { email :
"[email protected] " } ) 330+ BlacklistDal . contains ( { email :
"[email protected] " } ) , 331331 ) . resolves . toBeTruthy ( ) ;
332332 await expect (
333- BlacklistDal . contains ( { discordId : "testDiscordId" } )
333+ BlacklistDal . contains ( { discordId : "testDiscordId" } ) ,
334334 ) . resolves . toBeTruthy ( ) ;
335335 } ) ;
336336
@@ -355,8 +355,8 @@ describe("BlocklistDal", () => {
355355 it ( "hashes case insensitive" , ( ) => {
356356 [ "test" , "TEST" , "tESt" ] . forEach ( ( value ) =>
357357 expect ( BlacklistDal . hash ( value ) ) . toEqual (
358- "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
359- )
358+ "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" ,
359+ ) ,
360360 ) ;
361361 } ) ;
362362 } ) ;
0 commit comments