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

More tests for the LSP contract #34

Draft
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

snake-poison
Copy link
Collaborator

No description provided.

@netlify
Copy link

netlify bot commented Jun 27, 2021

✔️ Deploy Preview for romantic-shirley-1fb5ce ready!

🔨 Explore the source changes: a0bf555

🔍 Inspect the deploy log: https://app.netlify.com/sites/romantic-shirley-1fb5ce/deploys/60d80f6750ad090007c397f1

😎 Browse the preview: https://deploy-preview-34--romantic-shirley-1fb5ce.netlify.app

import LinearLongShortPairABI from "~/abis/LinearLongShortPairFinancialProductLibrary.json"

jest.setTimeout(40000)
expect.extend(waffleJest)

describe("LSP", function () {
const addresses: Record<string, Address> = {
const addresses = {
WETH: "0xd0a1e359811322d97991e03f863a0c30c2cf029c",
LSPCreator: "0x4C68829DBD07FEbB250B90f5624d4a5C30BBeC2c",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we should use the addresses.json file here. I recently had the problem that the json file contained the outdated LSPCreator address leading to the issue that the redeeming worked in tests but not in the app, which was quite a confusing situation.

test/contracts/LSP.spec.ts Show resolved Hide resolved
}
const contracts: Record<string, Contract> = {}
let namedAccounts: Record<string, Address>
let contracts: Record<keyof typeof addresses, Contract>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can't run any tests because it complains that contracts is undefined.
I think you will have to initialize the variable here. (See old version)
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Unfortunately after changing that I still get a bunch of errors due to contract objects being undefined. Were you able to run the tests on your machine ? (If so what is the command you used?)

test/contracts/LSP.spec.ts Show resolved Hide resolved
test/contracts/LSP.spec.ts Show resolved Hide resolved
@snake-poison snake-poison changed the base branch from main to devel June 27, 2021 16:19
@ckoopmann ckoopmann marked this pull request as draft June 27, 2021 16:56
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.

2 participants