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

Adds js/unit_tests.ts #448

Merged
merged 2 commits into from Aug 9, 2018
Merged

Adds js/unit_tests.ts #448

merged 2 commits into from Aug 9, 2018

Conversation

ry
Copy link
Member

@ry ry commented Aug 3, 2018

Depends on #434

@ry ry force-pushed the tests_ts branch 5 times, most recently from cf82cef to badda40 Compare August 3, 2018 06:37
@ry ry changed the base branch from master to tokio_timers August 3, 2018 06:38
@ry ry changed the base branch from tokio_timers to master August 3, 2018 06:39
@ry ry added this to the v0.1 (first binary release) milestone Aug 7, 2018
@ry ry changed the base branch from master to tokio_timers August 7, 2018 14:55
@ry ry force-pushed the tokio_timers branch 2 times, most recently from 8551164 to 1fcc498 Compare August 9, 2018 04:11
@ry ry changed the base branch from tokio_timers to master August 9, 2018 20:01
@ry ry requested a review from piscisaureus August 9, 2018 20:01
Copy link
Member

@piscisaureus piscisaureus left a comment

Choose a reason for hiding this comment

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

LGTM, but see comments.

if (a === b) {
return true;
}
if (
Copy link
Member

Choose a reason for hiding this comment

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

I think I wrote this, so here's a comment to self:
The a === b and isNan cases can be folded into a single one: if (Object.is(a, b)) { return true; }

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

tools/test.py Outdated
sys.exit(1)


def main(argv):
if len(argv) != 2:
print "Usage: tools/test.py [build dir]"
build_dir = build_path()
Copy link
Member

Choose a reason for hiding this comment

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

I'd find it easier to reason about written like this:

if len(argv) == 2:
  build_dir = sys.argv[1]
elif len(argv) == 1:
  build_dir = build_path()
else:
  print "Usage: tools/test.py [build_dir]"
  sys.exit(1)

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed.

js/unit_tests.ts Outdated
@@ -6,55 +6,12 @@
// serving the deno project directory. Try this:
Copy link
Member

Choose a reason for hiding this comment

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

stale comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed

js/unit_tests.ts Outdated
@@ -6,55 +6,12 @@
// serving the deno project directory. Try this:
// http-server -p 4545 --cors .
Copy link
Member

Choose a reason for hiding this comment

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

idem

Copy link
Member Author

Choose a reason for hiding this comment

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

?

}

// tslint:disable-next-line:no-any
export function equal(c: any, d: any): boolean {
Copy link
Member

Choose a reason for hiding this comment

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

This would be a prime use case for the unknown type (new in TypeScript 3).

Copy link
Member Author

Choose a reason for hiding this comment

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

I couldn't get it to work immediately but I added a comment.

@ry ry merged commit 9d90c4a into master Aug 9, 2018
@ry ry deleted the tests_ts branch September 1, 2018 16:05
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

2 participants