Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test to verify delay on local chain #2

Open
lucarlig opened this issue Apr 20, 2022 · 0 comments
Open

add test to verify delay on local chain #2

lucarlig opened this issue Apr 20, 2022 · 0 comments
Labels

Comments

@lucarlig
Copy link
Contributor

example:

  it("should fail with start too early ", async () => {
    try {
      await program.methods
        .initializePeriodRegistry(start[0], period_length[1], n_periods[1])
        .accounts({
          owner,
          periodRegistry,
          systemProgram: SystemProgram.programId,
        })
        .rpc();
      expect(false, "should return an error");
    } catch (e) {
      console.log(e);
      expect(e, "wrong error returned").to.have.property("programErrorStack");
    }
  });

this isn't working probably local solana chain and computer time aren't synced properly, find a working solution to make such a test work

@lucarlig lucarlig changed the title [TEST] add test to verify delay on local chain add test to verify delay on local chain Apr 20, 2022
@lucarlig lucarlig added the Test label Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant