Skip to content

Commit

Permalink
Allow ignoring files within .vscode and add small changes in test file
Browse files Browse the repository at this point in the history
  • Loading branch information
sofinico committed Sep 1, 2023
1 parent 69f106d commit bc0e76f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ node_modules

# Editors
.vscode/
!/.vscode/
# !/.vscode/ commented until necessary
6 changes: 2 additions & 4 deletions test-cases/gas-left/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ mod gas_left {
#[should_panic]
fn get_gas_left() {
let contract = GasLeft::new();

assert!(contract.get_gas_left() > 0);
}
}
Expand All @@ -47,18 +48,15 @@ mod gas_left {
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;

#[ink_e2e::test]
async fn get_gas_left_e2e(mut client: ink_e2e::Client<C, E>) -> E2EResult<()> {
// Given
async fn get_gas_left(mut client: ink_e2e::Client<C, E>) -> E2EResult<()> {
let constructor = GasLeftRef::new();

// When
let contract_acc_id = client
.instantiate("gas-left", &ink_e2e::bob(), constructor, 0, None)
.await
.expect("instantiate failed")
.account_id;

// Then
let get_gas_left = build_message::<GasLeftRef>(contract_acc_id)
.call(|contract| contract.get_gas_left());
let get_gas_left_res = client
Expand Down

0 comments on commit bc0e76f

Please sign in to comment.