Skip to content

Comments

Hansl/node e2e#355

Merged
hansl merged 10 commits intomasterfrom
hansl/node-e2e
Mar 13, 2020
Merged

Hansl/node e2e#355
hansl merged 10 commits intomasterfrom
hansl/node-e2e

Conversation

@hansl
Copy link
Contributor

@hansl hansl commented Feb 4, 2020

Includes #435.

@hansl
Copy link
Contributor Author

hansl commented Feb 19, 2020

@bas @nmattia This is the PR I'm trying to fix.

@hansl hansl force-pushed the hansl/node-e2e branch 3 times, most recently from b38bb7d to dd1f9f9 Compare March 7, 2020 03:26
@hansl
Copy link
Contributor Author

hansl commented Mar 9, 2020

Don't get scared by the amount of lines, the package-lock.json takes over 5000 of those.

@hansl hansl marked this pull request as ready for review March 9, 2020 17:38
@hansl hansl requested a review from a team March 9, 2020 17:38
@hansl hansl requested a review from a team as a code owner March 9, 2020 17:38
Copy link
Contributor

@pikajude pikajude left a comment

Choose a reason for hiding this comment

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

LGTM, assuming it passes CI :)

@@ -0,0 +1,71 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth deleting all the commented out lines here? I think the tsconfig format is well documented and this is pretty hard to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm okay with either. I just like to search for the field and see if it's enabled, but yeah it's pretty well documented and every IDE have completion for it.

Copy link
Contributor

@basvandijk basvandijk left a comment

Choose a reason for hiding this comment

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

The Nix changes look good sans some minor bugs.

Copy link
Contributor

@chenyan-dfinity chenyan-dfinity left a comment

Choose a reason for hiding this comment

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

IIRC, we are only testing the counter canister in node with a hand-written IDL-JS binding. What's preventing us from calling dfx build in node?

switch (status.status) {
case RequestStatusResponseStatus.Replied: {
return decodeReturnValue(returnType, status.reply.arg);
return status.reply && decodeReturnValue(returnType, status.reply.arg);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we throw if there is no status.reply? Also does this mean this will return a boolean instead of the actual return value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will return null if reply is null. I should investigate this as it was working on Friday but changed today.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to throw. Return value can also be null, and we want to distinguish a proper return from failure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a break from the public spec. So I'm not sure what happened but I'm investigating and it happened also in the rust code (see https://dfinity.slack.com/archives/CGA566TPV/p1583785482375400). I'll revert this line and look it up.

@hansl
Copy link
Contributor Author

hansl commented Mar 9, 2020

@chenyan-dfinity yes, that is correct. It’s a framework to add more tests.

@chenyan-dfinity
Copy link
Contributor

Can we call dfx build inside node? Or call node inside bats? This way, we can share a lot of code and infrastructure.

@hansl
Copy link
Contributor Author

hansl commented Mar 10, 2020

@chenyan-dfinity We're sharing >90% of the code already. We will need more stuff to use dfx projects, but it's out of scope of this PR and should be separate work.

@eftychis
Copy link
Contributor

eftychis commented Mar 10, 2020

Could you describe a bit more about the framework? I think I get the idea here, but I am not sure we get any good view of what the end result/framework would look like.

@hansl hansl merged commit a2978f9 into master Mar 13, 2020
@hansl hansl deleted the hansl/node-e2e branch March 13, 2020 00:20
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.

5 participants