@@ -36,6 +36,40 @@ describe("Config", () => {
36
36
} )
37
37
) . toMatchObject ( { rule : { provider : "Microsoft Teams" } } ) ;
38
38
} ) ;
39
+ it ( "returns Amazon Chime rather than Google Meet" , async ( ) => {
40
+ const config = await loadConfig ( ) ;
41
+ expect (
42
+ config . extractValidUrl ( {
43
+ hangoutLink : "https://meet.google.com/xxx" ,
44
+ description : "https://chime.aws/0000000000" ,
45
+ } )
46
+ ) . toMatchObject ( { rule : { provider : "Amazon Chime" } } ) ;
47
+ expect (
48
+ config . extractValidUrl ( {
49
+ description : [
50
+ "https://meet.google.com/xxx" ,
51
+ "https://chime.aws/0000000000" ,
52
+ ] . join ( "\n" ) ,
53
+ } )
54
+ ) . toMatchObject ( { rule : { provider : "Amazon Chime" } } ) ;
55
+ } ) ;
56
+ it ( "returns WebEx rather than Google Meet" , async ( ) => {
57
+ const config = await loadConfig ( ) ;
58
+ expect (
59
+ config . extractValidUrl ( {
60
+ hangoutLink : "https://meet.google.com/xxx" ,
61
+ description : "https://00000.webex.com/00000/j.php?MTID=xxx" ,
62
+ } )
63
+ ) . toMatchObject ( { rule : { provider : "WebEx" } } ) ;
64
+ expect (
65
+ config . extractValidUrl ( {
66
+ description : [
67
+ "https://meet.google.com/xxx" ,
68
+ "https://00000.webex.com/00000/j.php?MTID=xxx" ,
69
+ ] . join ( "\n" ) ,
70
+ } )
71
+ ) . toMatchObject ( { rule : { provider : "WebEx" } } ) ;
72
+ } ) ;
39
73
it ( "can extract Google Meet URL from hangoutLink" , async ( ) => {
40
74
const config = await loadConfig ( ) ;
41
75
expect (
@@ -105,6 +139,24 @@ describe("Config", () => {
105
139
} ) ;
106
140
}
107
141
) ;
142
+ it . each ( [ "https://chime.aws/0000000000" ] ) (
143
+ "can extract Amazon Chime from description: %s" ,
144
+ async ( url ) => {
145
+ const config = await loadConfig ( ) ;
146
+ expect ( config . extractValidUrl ( { description : url } ) ) . toMatchObject ( {
147
+ rule : { provider : "Amazon Chime" } ,
148
+ } ) ;
149
+ }
150
+ ) ;
151
+ it . each ( [ "https://00000.webex.com/00000/j.php?MTID=xxx" ] ) (
152
+ "can extract WebEx from description: %s" ,
153
+ async ( url ) => {
154
+ const config = await loadConfig ( ) ;
155
+ expect ( config . extractValidUrl ( { description : url } ) ) . toMatchObject ( {
156
+ rule : { provider : "WebEx" } ,
157
+ } ) ;
158
+ }
159
+ ) ;
108
160
it . each ( [ "https://meet.google.com/xxx-xxxx-xxx" ] ) (
109
161
"can extract Google Meet from description: %s" ,
110
162
async ( url ) => {
0 commit comments