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

Browsersync second round #20

Merged
merged 4 commits into from
Jan 12, 2017
Merged

Browsersync second round #20

merged 4 commits into from
Jan 12, 2017

Conversation

Munter
Copy link
Collaborator

@Munter Munter commented Jan 12, 2017

res.status needs to be polyfilled for browser-sync support

expect.use(require('unexpected-http'))
.use(require('unexpected-image'))
.use(require('unexpected-resemble'))
.use(require('unexpected-sinon'))
.use(require('magicpen-prism'))
.addAssertion('<string> to respond with <object|number>', function (expect, subject, value) {
var modifiedSubject = subject.replace(' ', ' http://localhost:9999');
.addAssertion('<string|object> to respond with <object|number>', function (expect, subject, value) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would read or document itself better if it was a middle-of-the-rocket assertion, something like expect('GET /foo', 'prepended with hostname', 'to yield response', 200)

Copy link
Owner

Choose a reason for hiding this comment

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

I agree that it's a bit weird.

I think I would actually prefer to use the vanilla to yield response satisfying assertion (unexpected-http) and just put http://localhost:${serverPort} into the url in each test. That would make it easier to realize that those tests connect to a "real" server instance.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll make that change

@coveralls
Copy link

coveralls commented Jan 12, 2017

Coverage Status

Coverage increased (+0.07%) to 92.008% when pulling 66f854a on browsersync-second-round into 023c9e2 on master.

@coveralls
Copy link

coveralls commented Jan 12, 2017

Coverage Status

Coverage increased (+0.07%) to 92.008% when pulling 751989f on browsersync-second-round into 023c9e2 on master.

@Munter
Copy link
Collaborator Author

Munter commented Jan 12, 2017

@papandreou @joelmukuthu How about now?

Copy link
Collaborator

@joelmukuthu joelmukuthu left a comment

Choose a reason for hiding this comment

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

LGTM :)

@Munter Munter merged commit 34a8783 into master Jan 12, 2017
@Munter Munter deleted the browsersync-second-round branch January 12, 2017 15:27
@Munter
Copy link
Collaborator Author

Munter commented Jan 12, 2017

Released in v7.1.1

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.

4 participants