File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed
tests/slack_cli_hooks/hooks Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 1818 "doctor" : f"{ EXEC } -m slack_cli_hooks.hooks.doctor" ,
1919 },
2020 "config" : {
21- "watch" : {"filter-regex" : "(^manifest\\ .json$)" , "paths" : ["." ]},
2221 "protocol-version" : [MessageBoundaryProtocol .name , DefaultProtocol .name ],
2322 "sdk-managed-connection-enabled" : True ,
23+ "watch" : {
24+ "app" : {
25+ "filter-regex" : "\\ .py$" ,
26+ "paths" : ["." ],
27+ },
28+ "manifest" : {
29+ "paths" : ["manifest.json" ],
30+ },
31+ },
2432 },
2533 "runtime" : "python" ,
2634}
Original file line number Diff line number Diff line change 1- import re
2-
31from slack_cli_hooks .hooks .get_hooks import hooks_payload
42
53
@@ -18,13 +16,18 @@ def test_hooks_payload_config(self):
1816 assert config ["sdk-managed-connection-enabled" ] is True
1917 assert config ["protocol-version" ] == ["message-boundaries" , "default" ]
2018
21- def test_hooks_watch_regex (self ):
19+ def test_hooks_watch_app (self ):
2220 config = hooks_payload ["config" ]
23-
2421 assert config ["watch" ] is not None
22+ assert config ["watch" ]["app" ] is not None
23+ assert config ["watch" ]["app" ]["filter-regex" ] == "\\ .py$"
24+ assert config ["watch" ]["app" ]["paths" ] == ["." ]
2525
26- filter_regex = config ["watch" ]["filter-regex" ]
27- assert re .match (filter_regex , "manifest.json" ) is not None
26+ def test_hooks_watch_manifest (self ):
27+ config = hooks_payload ["config" ]
28+ assert config ["watch" ] is not None
29+ assert config ["watch" ]["manifest" ] is not None
30+ assert config ["watch" ]["manifest" ]["paths" ] == ["manifest.json" ]
2831
2932 def test_hooks_runtime (self ):
3033 runtime = hooks_payload ["runtime" ]
You can’t perform that action at this time.
0 commit comments