From 321b70b40b8a1db9747e697503fd5003a7166508 Mon Sep 17 00:00:00 2001 From: Abeeujah Date: Sat, 16 Nov 2024 11:42:54 +0100 Subject: [PATCH 1/2] test: Add unit tests to artifacts.rs module --- crates/scarb-api/src/artifacts.rs | 112 ++++++++++++++++++ .../scarb-api/src/artifacts/representation.rs | 4 +- .../basic_package/tests/test_contract.cairo | 0 3 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 crates/scarb-api/tests/data/basic_package/tests/test_contract.cairo diff --git a/crates/scarb-api/src/artifacts.rs b/crates/scarb-api/src/artifacts.rs index 75632b56d2..9a50a03e4f 100644 --- a/crates/scarb-api/src/artifacts.rs +++ b/crates/scarb-api/src/artifacts.rs @@ -92,3 +92,115 @@ fn compile_artifact_at_path(path: &Utf8Path) -> Result Date: Thu, 21 Nov 2024 12:06:06 +0100 Subject: [PATCH 2/2] fix: Requested Changes --- crates/scarb-api/src/artifacts.rs | 32 ++++++++++++------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/crates/scarb-api/src/artifacts.rs b/crates/scarb-api/src/artifacts.rs index 9a50a03e4f..e16a6d7178 100644 --- a/crates/scarb-api/src/artifacts.rs +++ b/crates/scarb-api/src/artifacts.rs @@ -95,8 +95,6 @@ fn compile_artifact_at_path(path: &Utf8Path) -> Result