@@ -5,16 +5,15 @@ import { getMessageMock } from '../test/mocks';
55
66describe ( 'thx' , ( ) => {
77 let id = 0 ;
8+ const msgReply = 'protip: napisz `@nazwa ++`, żeby komuś podziękować! Możesz podziękować kilku osobom w jednej wiadomości!' ;
89
910 it ( 'it should ignore random messages' , async ( ) => {
1011 const msg = getMessageMock ( 'msg' , { content : 'msg' , channel : { id : ++ id } } ) ;
1112 msg . reply . resolves ( ) ;
1213
1314 await thx ( msg as unknown as Discord . Message ) ;
1415
15- expect ( msg . reply ) . not . to . have . been . calledOnceWith (
16- 'protip: napisz `@nazwa ++`, żeby komuś podziękować!' ,
17- ) ;
16+ expect ( msg . reply ) . not . to . have . been . calledOnceWith ( msgReply ) ;
1817 } ) ;
1918
2019 it ( 'it should respond to thanks' , async ( ) => {
@@ -23,9 +22,7 @@ describe('thx', () => {
2322
2423 await thx ( msg as unknown as Discord . Message ) ;
2524
26- expect ( msg . reply ) . to . have . been . calledOnceWith (
27- 'protip: napisz `@nazwa ++`, żeby komuś podziękować!' ,
28- ) ;
25+ expect ( msg . reply ) . to . have . been . calledOnceWith ( msgReply ) ;
2926 } ) ;
3027
3128 [
@@ -42,9 +39,7 @@ describe('thx', () => {
4239 msg . reply . resolves ( ) ;
4340 await thx ( msg as unknown as Discord . Message ) ;
4441
45- expect ( msg . reply ) . not . to . have . been . calledOnceWith (
46- 'protip: napisz `@nazwa ++`, żeby komuś podziękować!' ,
47- ) ;
42+ expect ( msg . reply ) . not . to . have . been . calledOnceWith ( msgReply ) ;
4843 } ) ,
4944 ) ;
5045} ) ;
0 commit comments