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

Updated API for 2.0.0 release #23

Merged
merged 18 commits into from
Feb 21, 2017
Merged

Updated API for 2.0.0 release #23

merged 18 commits into from
Feb 21, 2017

Conversation

mefellows
Copy link
Member

My take on an updated API that is simpler to use.

Almost all of the updated code are tests and documentation, but I see that as a good thing.

@@ -8,8 +8,8 @@ check:
functions: 80
excludes: []
each:
statements: 80
lines: 80
statements: 60
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 needed to do this because the Verifier class is basically a wrapper of pact-node's Verifier and the integration tests didn't seem to cover it. Any unit test would stub it out such that it would be a useless test.

@@ -6,7 +6,7 @@ var DIST = path.resolve(__dirname, '../dist');
var APP = path.resolve(__dirname, '../src');

module.exports = {
entry: path.resolve(APP, 'pact.js'),
entry: path.resolve(APP, 'pact-karma.js'),
Copy link
Member Author

Choose a reason for hiding this comment

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

Similarly, as pact-node became a dependency, webpack pooped its pants and obviously couldn't deal with a few thousand Ruby files now on the path (and of course, this would never work in the browser). It seemed this was the cleanest option, albeit with some duplication.

@@ -14,6 +14,7 @@
"license": "MIT",
"devDependencies": {
"@pact-foundation/pact-node": "^4.6.0",
"cli-color": "^1.1.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

This is to make the console nice and red when there is a Pact failure (see https://github.com/pact-foundation/pact-js/pull/23/files#diff-ad2d27cf5c00ddf29bdafb5718a2a771R108). Might be overkill, thoughts?

@coveralls
Copy link

coveralls commented Feb 19, 2017

Coverage Status

Coverage decreased (-0.7%) to 95.402% when pulling 0b0204c on fix/verify into 5fd003e on master.

@robinglen
Copy link

Nice one, thanks for this

@mefellows mefellows merged commit 2df3e1e into master Feb 21, 2017
@mefellows mefellows deleted the fix/verify branch February 21, 2017 21:38
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