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

Karma/jasmine/pact-js example using requirejs
Does Pact support REST and JMS?
Pattern match for individual parameters in pact-consumer tests
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

Categories

HOME
asp.net
gulp
excel-formula
internet-explorer
postgresql
macros
marie
salesforce
casting
android-ndk
confluence-rest-api
aggregate-functions
vsixmanifest
ephesoft
sahi
pyodbc
token
hql
k-means
ringcentral
wallet
javaagents
concatenation
bootstrap-accordion
oracle10g
akavache
traveling-salesman
workflow-foundation
multiple-inheritance
typeclass
dynamics-ax-2012-r3
storefront
angularjs-resource
bootcamp
rythm
matrix-multiplication
mapquest
ninja-forms
test-kitchen
wufoo
gridgain
piranha-cms
line-endings
infovis
activeandroid
runner
import.io
evaluation
node-java
openpgp.js
bipartite
sqlproj
alfred
init
hfp
nimbus
usps
custom-build-step
google-app-engine-php
magnet-uri
play-json
page-flipping
cloud-storage
clearquest
waterline
nsq
iphone-6
dojox.grid
uiblureffect
react-os
breeze-sharp
livescript
object-oriented-database
facebook-java-api
fade
sygic
grape-api
zend-db-table
extensibility
select2-rails
architectural-patterns
qt5.1
expresso-store
jquery-ui-map
diazo
advanceddatagrid
ruby-1.9
maven-eclipse-plugin
apache-commons-email
xpolog
simultaneous
data-formats
content-delivery-network

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App