pact


Karma/jasmine/pact-js example using requirejs


I am working on the karma/jasmine example. It works fine as-is. I need to get it to work with requirejs. When I introduce requirejs and convert the client and client-spec classes to AMDs, I start getting this error:
PhantomJS 2.1.1 (Windows 7 0.0.0) Client sayHello should say hello FAILED
TypeError: undefined is not a constructor (evaluating 'Pact') in js/client-spec.js (line 11)
js/client-spec.js:11:28
To see the problem, you can look at my example project. To run it:
Extract the zip file
From the PactTest directory, run:
npm install
After that is finished, run:
npm run test:client
Cheers,
Mike

Related Links

Starting point for PACT-JS newbie
Using pact for contract tests on CI in one container without a pipeline?
Who is the consumer in a POST scenario?
How to mock user authentication on Rails with Pact contract verification?
Pact verify provider, what does Pact::UnexpectedIndex mean?
Pact Matcher - How to use “each like” for an array of arrays values
Using Pact Broker
Pact - how to write expectations on requests?
PACT: How to guard against consumer generating incorrect contracts
Missing 'PactFragment' in package au.com.dius.pact.model
Why is this pact-jvm provider test failing?
pact-jvm Consumer Pact Test
How to have tests distributed across classes at provider end for same consumer
How to use Pact Matcher for values other than 'Strings'
How to verify an image contains in the response via pact test
Can I create a PACT to run on a different hostname?

Categories

HOME
internet-explorer
http
stanford-nlp
system-calls
webvr
liquibase
spss
salesforce-lightning
opc-ua
foreach
comments
country-codes
sitemap
doctrine2
vsixmanifest
box-api
cracking
wowza
aws-sdk-cpp
drush
web-parts
accordion
turn.js
cherrypy
policy
struts
ppp
ckeditor4.x
typeclass
typeorm
git-submodules
tunnel
flex3
javafxports
motherboard
gstreamer-1.0
stochastic-process
oracle-bpm-suite
mediastream
pyexcel
ape-phylo
logan-square
niagara-ax
serverless-architecture
pyopenssl
monaca
riemann
dotnet-cli
intermediate-language
sp
androiddesignsupport
nsalert
printer-control-language
lightspeed
glade
eclipse-mars
git-push
access-violation
jspx
instaparse
falcon
sbt-proguard
web-optimization
askbot
angular-promise
android-togglebutton
textblob
opennebula
clearcanvas
pnunit
pytz
amzi-prolog
farpoint-spread
node-amqp
mysql-error-1146
jfilechooser
google-voice
8-puzzle
nsautoreleasepool
magicsuggest
simplemembership
architectural-patterns
blotter
setcookie
urlfetch
esi
netbiscuits
hypertable
beep
overlays
cinder
qlibrary
j++

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App