Skip to content

Commit

Permalink
wip: tidy up debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Apr 18, 2020
1 parent 6c869bd commit 3f59540
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 29 deletions.
8 changes: 1 addition & 7 deletions examples/e2e/test/consumer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ const path = require("path")
const chai = require("chai")
const chaiAsPromised = require("chai-as-promised")
const expect = chai.expect
const { Pact, Matchers, Publisher } = require("@pact-foundation/pact")
const pact = require("@pact-foundation/pact")

console.log("pact: ", pact)
console.log("pact.Publisher: ", pact.Publisher)
console.log("Publisher: ", Publisher)

const { Pact, Matchers } = require("@pact-foundation/pact")
const LOG_LEVEL = process.env.LOG_LEVEL || "WARN"

chai.use(chaiAsPromised)
Expand Down
18 changes: 2 additions & 16 deletions examples/e2e/test/publish.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
console.log("Clearing existing require cache:")

for (let key in require.cache) {
delete require.cache[key]
}

console.log("require.main:")
console.log(require.main)
console.log("require.resolve:")
console.log(require.resolve("@pact-foundation/pact"))
const pact = require("@pact-foundation/pact")

console.log("pact: ", pact)
console.log("publisher:", pact.Publisher)

const { Publisher } = require("@pact-foundation/pact")
const path = require("path")
const opts = {
pactFilesOrDirs: [
Expand All @@ -32,7 +18,7 @@ const opts = {
: Math.floor(new Date() / 1000)),
}

new pact.Publisher(opts)
new Publisher(opts)
.publishPacts()
.then(() => {
console.log("Pact contract publishing complete!")
Expand Down
1 change: 0 additions & 1 deletion examples/messages/provider/message-provider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ describe("Message provider tests", () => {
return Promise.resolve(`state set to create a dog`)
},
},
log: path.resolve(process.cwd(), "logs"),
logLevel: "info",
provider: "MyJSMessageProvider",
providerVersion: "1.0.0",
Expand Down
3 changes: 0 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ ${DIR}/prepare.sh
(cd dist && npm link)
(cd dist-web && npm link)

echo '\nconsole.log("HELLO FROM PACT MODULE");' >> dist/pact.js
echo '\nconsole.log("HELLO FROM PACT WEB MODULE");' >> dist/pact-web.js

echo "Running e2e examples build for node version ${TRAVIS_NODE_VERSION}"
for i in examples/*; do
[ -e "$i" ] || continue # prevent failure if there are no examples
Expand Down
4 changes: 2 additions & 2 deletions src/dsl/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ type ExcludedPactNodeVerifierKeys = Exclude<
keyof PactNodeVerifierOptions,
"providerBaseUrl"
>
export type PactNodeVerificationExcludedOptions = Pick<
export type PactNodeVerificationIncludedOptions = Pick<
PactNodeVerifierOptions,
ExcludedPactNodeVerifierKeys
>

export type PactMessageProviderOptions = PactNodeVerificationExcludedOptions &
export type PactMessageProviderOptions = PactNodeVerificationIncludedOptions &
MessageProviderOptions

export interface MessageConsumerOptions {
Expand Down

0 comments on commit 3f59540

Please sign in to comment.