-
Notifications
You must be signed in to change notification settings - Fork 1
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
reorg #96
Conversation
aleeusgr
commented
May 16, 2023
•
edited
Loading
edited
- contract endpoint??
- Tx()
53 it("works with datumHash and datum at spend time")
54 it("works with inlineDatum and no special datum at spend time")
55 🤯 |
- [ ] | ||
```javascript | ||
describe("vesting contract"), () => { | ||
describe("contract initiation", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I didn't get nesting here,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took some code from vitest docs for the structure; I looked at Test Context and describe, test, beforeAll ... docpage.
suggested Redeemer didn't work;
So I concentrated on test properties and thinking about encapsulation;
how do I make reusable functions in JS?
how do I restructure vesting example to have test coverage?
- review natural language description
- write properties
|
||
- [ ] | ||
```javascript | ||
describe("vesting contract"), () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
creates a vesting contract that locks funds until deadline
```javascript | ||
describe("vesting contract"), () => { | ||
describe("contract initiation", () => { | ||
it("holds assets for vesting", async() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wallet utxo?
describe("contract initiation", () => { | ||
it("holds assets for vesting", async() => { | ||
}) | ||
it("lets the initiator take their own funds back, until the contract is claimed", async () => {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this describes a transaction, I am not there yet.,
it("lets the initiator take their own funds back, until the contract is claimed", async () => {}) | ||
}) | ||
describe("contract claim", async() => { | ||
it("allows the recipient to mint a claim token they can hold in their wallet" async() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- think about the redeemer
describe("contract claim", async() => { | ||
it("allows the recipient to mint a claim token they can hold in their wallet" async() => { | ||
}) | ||
it("doesn't let the initiator withdraw funds once claimed", async() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redeemer?
}) | ||
}) | ||
|
||
describe("gradual maturation", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤯
- [ ] | ||
```javascript | ||
it("works with datumHash and datum at spend time") | ||
it("works with inlineDatum and no special datum at spend time") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
datumHash and inlineDatum are treated differently
vestingProgram = new helios.Program( ... ); | ||
... | ||
}) | ||
it ("tests things while reusing provided `vestingProgram`", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
encapsulation 🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took some code from vitest docs for the structure; I looked at Test Context and describe, test, beforeAll ... docpage.
suggested Redeemer didn't work;
So I concentrated on test properties and thinking about encapsulation;
how do I make reusable functions in JS?
how do I restructure vesting example to have test coverage?
- review natural language description
- write properties