v2.6.2
Welcome to the release notes for Scarb v2.6.2!
Fix compilation of tests with contracts in dependencies
Since Scarb does not compile tests defined in the dependencies of a tested package, all items with the #[cfg(test)]
attribute are removed from all components in the compilation unit apart from the main component (i.e., the package that is tested).
This behavior implies that there cannot be any expectation in the Cairo test runner, that items defined under the #[cfg(test)]
in dependencies are available to be imported during testing. Unfortunately, the implementation of test runner in recent releases of Scarb in some cases has erroneously expected one of the variables in the contract definition to be available under those circumstances. This meant that for some projects, the test runner failed to execute the test.
This quick release introduces a fix.
Cairo Version
This version of Scarb comes with Cairo v2.6.2
.
What's Changed
Full Changelog: v2.6.1...v2.6.2