fix: test command
This commit is contained in:
parent
f0a9080ef7
commit
59afafba0e
2
Makefile
2
Makefile
@ -43,7 +43,7 @@ test: lint
|
||||
yarn test
|
||||
yarn copy:assets:tauri
|
||||
yarn build:icon
|
||||
cargo test --manifest-path src-tauri/Cargo.toml --no-default-features --features test-tauri
|
||||
cargo test --manifest-path src-tauri/Cargo.toml --no-default-features --features test-tauri -- --test-threads=1
|
||||
|
||||
# Builds and publishes the app
|
||||
build-and-publish: install-and-build
|
||||
|
||||
@ -30,7 +30,6 @@ test-tauri = [
|
||||
"tauri/test",
|
||||
]
|
||||
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.0.2", features = [] }
|
||||
|
||||
|
||||
@ -94,7 +94,9 @@ pub fn update_app_configuration(
|
||||
#[tauri::command]
|
||||
pub fn get_jan_data_folder_path<R: Runtime>(app_handle: tauri::AppHandle<R>) -> PathBuf {
|
||||
if cfg!(test) {
|
||||
let path = PathBuf::from("test-data");
|
||||
let path = std::env::current_dir()
|
||||
.unwrap_or_else(|_| PathBuf::from("."))
|
||||
.join("test-data");
|
||||
if !path.exists() {
|
||||
let _ = fs::create_dir_all(&path);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user