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

Fixes #90. Add Intern unit tests for isReportableUrl. #116

Merged
merged 8 commits into from
May 18, 2018

Conversation

laghee
Copy link
Contributor

@laghee laghee commented May 17, 2018

r? @miketaylr

Lots of messy committing! (And I might have missed something in my delirium, just let me know.)

Edit: OK, more messy commit snarls, but I think I got all the leftover comments & the very, very sad comma.

@miketaylr
Copy link
Member

Awesome!

Can you check out the error message from Travis?

https://travis-ci.org/webcompat/webcompat-reporter-extensions/builds/380409861#L465

(I should be able to review this tomorrow morning)

package.json Outdated
"web-ext": "^2.4.0",
"webpack": "^4.1.1",
"webpack-cli": "^2.0.10"
},
"license": "MPL-2.0"
"license": "MPL-2.0",

This comment was marked as abuse.

This comment was marked as abuse.

@@ -2,11 +2,14 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */

const webpack = require("webpack");
// import webpack from "webpack";

This comment was marked as abuse.

This comment was marked as abuse.


/*
Returns a promise that resolves once webpack has compiled all the addon
configs have been built.
*/
// export default function

This comment was marked as abuse.

This comment was marked as abuse.

const { registerSuite } = intern.getInterface("object");
const { assert } = intern.getPlugin("chai");

const helpers = require("./lib/helpers");
const shell = require("shelljs");
// const helpers = require("./lib/helpers");

This comment was marked as abuse.

This comment was marked as abuse.

Copy link
Member

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

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

This is awesome! Just one tiny nit, can you add a newline to .babelrc?

Then we just need to clean up the history, but we can also just punt and squash everything.

@@ -0,0 +1,3 @@
{
"plugins": ["transform-es2015-modules-commonjs"]
}

This comment was marked as abuse.

"node": {
"plugins":
"node_modules/babel-register/lib/node.js"

This comment was marked as abuse.

"calling isReportableURL with invalid protocols will not return true"() {
// Verify that calling isReportableURL with invalid protocol does not return true.
let guacUrl = "guacamole://yumavocados.com";
let ftpUrl = "ftp://downloadfreetacos.com";

This comment was marked as abuse.

@miketaylr
Copy link
Member

One tiny tip for rebasing against master so you don't end up with merge commits.

Since you're doing this from your fork, you need to make sure you have an upstream remote:

git remote -v will tell you that, and if you don't (but I assume you do?), https://help.github.com/articles/configuring-a-remote-for-a-fork/ has some help on that.

So the first step is to sync up remotes:

git remote update

This won't do anything destructive, it'll just make sure it knows about the latest changes on the server.

Then you want to do the rebase, which essentially means to put your local patches on top of any new stuff on master.

git pull --rebase upstream master

This is saying, pull in the latest stuff from the master branch on upstream remote, but as a rebase.

Assuming that works, you'll see something like "replaying your commits on top of blah".

But at this point, your local branch will be different from whatever you've already pushed to GitHub, so if you try to git push you'll get rejected. That's OK. It just means you have to force push:

git push -f

Just don't get too comfortable force pushing. :) It's always good to make sure you're not on master, for example. :))

Once you've done that, you've got the latest commits, and no merge commits, etc.

@laghee
Copy link
Contributor Author

laghee commented May 18, 2018

That makes sense. I've always been suspicious of -f and avoided it, so now I understand why merging was always wonky.

Do I have to check out my remote master to do update and pull --rebase, or can I do that directly from the branch?

Edit: Answered my own question. 😄

@miketaylr miketaylr merged commit 643c022 into webcompat:master May 18, 2018
@miketaylr
Copy link
Member

Thank you!

@laghee laghee deleted the issue90 branch May 22, 2018 11:41
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.

3 participants