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

Get wct-mocha compiling clean. #755

Merged
merged 2 commits into from
Oct 25, 2018
Merged

Get wct-mocha compiling clean. #755

merged 2 commits into from
Oct 25, 2018

Conversation

rictic
Copy link
Contributor

@rictic rictic commented Oct 24, 2018

Wanted to get this compiling clean as part of internalizing this

@usergenic
Copy link
Contributor

@rictic can you merge master into this? it should hopefully allow integration tests to pass.

@usergenic
Copy link
Contributor

Also @rictic, this looks like a lot of work. Great job!

@rictic
Copy link
Contributor Author

rictic commented Oct 25, 2018

Huh, this seems to be up to date with master. Maybe one of the changes I made wasn't as safe as I thought?

@usergenic
Copy link
Contributor

Oh I assumed it was just failing because of Firefox 63, but you're right this branch does have the travis.yml pinning version to 62...

@rictic
Copy link
Contributor Author

rictic commented Oct 25, 2018

I'll bisect the changes, will ping this thread again once it's ready to review :)

This change causes the tests to fail!
@rictic rictic force-pushed the wct-mocha-typings branch from a86c8f0 to 9e0cb58 Compare October 25, 2018 18:21
@rictic
Copy link
Contributor Author

rictic commented Oct 25, 2018

Error bisected and fixed, ready to review. Please take a look!

@usergenic
Copy link
Contributor

Taking a look!

* @return A reporter-like "class" for each child suite
* that should be passed to `mocha.run`.
*/
childReporter(location: Location|string): ReporterFactory {
const name = this.suiteTitle(location);
Copy link
Contributor

Choose a reason for hiding this comment

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

So this was straight up not used? Huh. Good find.

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 just turned on warning for unused vars and props.

That's also why I made some properties not private, because they weren't used anywhere, but I wasn't confident enough to delete them, so they're public for now.

if (target[key] !== null && typeof target[key] === 'object' &&
!Array.isArray(target[key])) {
deepMerge(target[key], source[key]);
export function deepMerge<V extends {}>(target: V, source: V) {
Copy link
Contributor

Choose a reason for hiding this comment

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

😲I am learning some TypeScript from this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'd prefer to rewrite these deep merge functions (we have two!) into something less magical.. but that's for another time

Copy link
Contributor

@usergenic usergenic left a comment

Choose a reason for hiding this comment

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

LGTM

@rictic
Copy link
Contributor Author

rictic commented Oct 25, 2018

Thanks for the quick review!

@rictic rictic merged commit fbc1a8f into master Oct 25, 2018
@rictic rictic deleted the wct-mocha-typings branch October 25, 2018 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants