Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrobles92 committed Apr 15, 2024
1 parent 856c5d1 commit 0030dad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/sozo/src/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ fn create_stats_table(contracts_statistics: Vec<ContractStatistics>) -> Table {

#[cfg(test)]
mod tests {
use super::{create_stats_table, BuildArgs};
use dojo_test_utils::compiler::build_test_config;
use prettytable::format::consts::FORMAT_NO_LINESEP_WITH_TITLE;
use prettytable::{format, Cell, Row, Table};
use sozo_ops::statistics::ContractStatistics;

use super::{create_stats_table, BuildArgs};

#[test]
fn build_example_with_typescript_and_unity_bindings() {
let config = build_test_config("../../examples/spawn-and-move/Scarb.toml").unwrap();
Expand All @@ -124,6 +124,7 @@ mod tests {
typescript: true,
unity: true,
typescript_v2: true,
stats: true,
};
let result = build_args.run(&config);
assert!(result.is_ok());
Expand Down Expand Up @@ -151,6 +152,7 @@ mod tests {
];

let mut expected_table = Table::new();
expected_table.set_format(*FORMAT_NO_LINESEP_WITH_TITLE);
expected_table.add_row(Row::new(vec![
Cell::new_align("Contract", format::Alignment::CENTER),
Cell::new_align("Bytecode size (felts)", format::Alignment::CENTER),
Expand Down

0 comments on commit 0030dad

Please sign in to comment.