MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_detect_presence_file_not_dir

Function test_detect_presence_file_not_dir

atomic-agent/src/hooks/opencode.rs:1044–1053  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1042
1043 #[test]
1044 fn test_detect_presence_file_not_dir() {
1045 let tmp = TempDir::new().unwrap();
1046 std::fs::write(tmp.path().join(".opencode"), "not a dir").unwrap();
1047 let hook = make_hook();
1048 // A regular file named .opencode is not a directory, so repo-local
1049 // detection fails. Overall result depends on global plugin state.
1050 if !OpenCodeHook::is_plugin_installed() {
1051 assert!(!hook.detect_presence(tmp.path()));
1052 }
1053 }
1054
1055 #[test]
1056 fn test_install_returns_count_based_on_plugin() {

Callers

nothing calls this directly

Calls 4

writeFunction · 0.70
make_hookFunction · 0.70
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected