Browse Source

fix(ci): windows tests

Lucas Nogueira 3 years ago
parent
commit
ef9ecd511f
1 changed files with 4 additions and 3 deletions
  1. 4 3
      core/tauri/src/api/file.rs

+ 4 - 3
core/tauri/src/api/file.rs

@@ -48,8 +48,10 @@ mod test {
 
     assert!(res.is_err());
 
-    #[cfg(not(windows))]
     if let Error::Io(e) = res.unwrap_err() {
+      #[cfg(windows)]
+      assert_eq!(e.to_string(), "Access is denied. (os error 5)".to_string());
+      #[cfg(not(windows))]
       assert_eq!(e.to_string(), "Is a directory (os error 21)".to_string());
     }
   }
@@ -86,9 +88,8 @@ mod test {
 
     assert!(res.is_err());
 
+    #[cfg(not(windows))]
     if let Error::Io(e) = res.unwrap_err() {
-      #[cfg(windows)]
-      assert_eq!(e.to_string(), "Access is denied. (os error 5)".to_string());
       #[cfg(not(windows))]
       assert_eq!(e.to_string(), "Is a directory (os error 21)".to_string());
     }