Keab
Keab

Reputation: 11

How to fix the error "error[E03002]: unbound module" when I run "sui move test" in the terminal?

When I run "sui move test" in my move package folder I receive the following error in the terminal:

error[E03002]: unbound module
    ┌─ ./sources/bet.tests.move:504:13
    │
504 │             ts::return_shared(bet_val);
    │             ^^ Unbound module alias 'ts'

What does this error mean and how can I fix it?

Upvotes: 0

Views: 502

Answers (1)

Georges-Charles Brain
Georges-Charles Brain

Reputation: 158

You should import the test_scenario module from the sui framework package as the alias "ts" at the start of your module.

use sui::test_scenario::{Self as ts};

Upvotes: 0

Related Questions