-
Notifications
You must be signed in to change notification settings - Fork 59
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
refactor(tests): migrate remaining tests ts #1520
Conversation
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.
LGTM apart from the pending todos comments.
test/unit/memory-account.ts
Outdated
@@ -43,23 +43,23 @@ describe('MemoryAccount', function () { | |||
}) | |||
|
|||
it('Init with secretKey as hex string', async () => { | |||
const acc = MemoryAccount({ keypair: testAcc }) | |||
return acc.address().should.eventually.be.equal(testAcc.publicKey) | |||
const acc: _AccountMemory = MemoryAccount({ keypair: testAcc }) |
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.
const acc: _AccountMemory = MemoryAccount({ keypair: testAcc }) | |
const acc = MemoryAccount({ keypair: testAcc }) |
didn't we already defined MemoryAccount
as _AccountMemory
?
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.
Yes, but it's a stamp, so acc gets an any
type without the : _AccountMemory
0711007
to
8b797f5
Compare
src/utils/aepp-wallet-communication/connection/BrowserWindowMessage.ts
Outdated
Show resolved
Hide resolved
src/utils/aepp-wallet-communication/connection/BrowserWindowMessage.ts
Outdated
Show resolved
Hide resolved
test/integration/contract.ts
Outdated
const queryFee = 500000 | ||
const ttl = { RelativeTTL: [50] } | ||
|
||
before(async () => { | ||
contract = await aeSdk.getContractInstance({ source: oracleContract }) | ||
await contract.deploy() | ||
await contract.deploy([], {}) | ||
if (contract.deployInfo.address == null) throw new InternalError('Expected to not happen, required for TS') |
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.
can deploy
function assert that deployInfo.address
would be present?
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions
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.
We can add a function like this one, and use it to assert that deployInfo.address
will be present at a certain scope. But I don't think we can make deploy
itself do both.
export function assertAddress (address: any): asserts address is EncodedData<'ct'> {
if (address == null) throw new IllegalArgumentError('Address is required')
}
8b797f5
to
739656c
Compare
739656c
to
c5ec62b
Compare
7db7a95
to
d3f7904
Compare
ff9a8a1
to
6b19bd8
Compare
1ac7bf7
to
57fd1ee
Compare
57fd1ee
to
71d3592
Compare
This pull request introduces 5 alerts when merging 71d3592 into 88d25af - view on LGTM.com new alerts:
|
71d3592
to
3fc6f6d
Compare
BREAKING CHANGE: `computeBidFee` accepts `startFee`, `increment` as options
3fc6f6d
to
4e2ece7
Compare
This pull request introduces 5 alerts when merging 4e2ece7 into 88d25af - view on LGTM.com new alerts:
|
No description provided.