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

reorg #96

Closed
wants to merge 119 commits into from
Closed

reorg #96

wants to merge 119 commits into from

Conversation

aleeusgr
Copy link
Owner

@aleeusgr aleeusgr commented May 16, 2023

  • contract endpoint??
  • Tx()
 40 describe("vesting contract", () => {
 41   let vestingProgram, initiatorWallet, recipientWallet; 
 42   beforeEach(() => { 
 43     vestingProgram = new helios.Program( ... ); 
 44      ...
 45   })
 46   it ("tests things while reusing provided `vestingProgram`", async () => {
 47     ...
 48   })
 49 })
 50 ```

@aleeusgr
Copy link
Owner Author

aleeusgr commented May 16, 2023

 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", () => {
Copy link
Owner Author

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,

Copy link
Owner Author

@aleeusgr aleeusgr left a 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"), () => {
Copy link
Owner Author

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() => {
Copy link
Owner Author

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 () => {})
Copy link
Owner Author

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() => {
Copy link
Owner Author

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() => {
Copy link
Owner Author

@aleeusgr aleeusgr May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redeemer?

})
})

describe("gradual maturation", () => {
Copy link
Owner Author

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")
Copy link
Owner Author

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 () => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encapsulation 🤯

Copy link
Owner Author

@aleeusgr aleeusgr left a 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

aleeusgr

This comment was marked as duplicate.

@aleeusgr
Copy link
Owner Author

image

@aleeusgr aleeusgr closed this May 17, 2023
@aleeusgr aleeusgr deleted the int-test branch May 18, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant