npm - Error: No provider for "framework:pact" -


i trying use pactjs , generate pacts.

i using karma / jasmine run tests..

below package.json

{   "name": "andriod-pact",   "version": "1.0.0",   "description": "this microservice 1 of 2 consumers of  provider microservice",   "main": "index.js",   "scripts": {   "test": "echo \"error: no test specified\" && exit 1"  },   "author": "",   "license": "isc",   "devdependencies": {   "jasmine": "^2.6.0",   "karma": "^1.7.0",   "karma-phantomjs-launcher": "^1.0.4",   "pact": "^2.6.0"  } } 

and karma.conf file

// karma configuration // generated on tue jul 25 2017 15:32:06 gmt+0200 (w. europe daylight time)

    module.exports = function(config) {       config.set({          // base path used resolve patterns (eg. files, exclude)         basepath: '',          // frameworks use         // available frameworks: https://npmjs.org/browse/keyword/karma-adapter         frameworks: ['jasmine', 'pact'],          // list of files / patterns load in browser         files: [          '../../dist/pact-web.js',         'src/test/js/*.js'         ],           // list of files exclude         exclude: [         ],           // preprocess matching files before serving them browser         // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor         preprocessors: {         },           // test results reporter use         // possible values: 'dots', 'progress'         // available reporters: https://npmjs.org/browse/keyword/karma-reporter         reporters: ['progress'],           // web server port         port: 9876,           // enable / disable colors in output (reporters , logs)         colors: true,           // level of logging         // possible values: config.log_disable || config.log_error || config.log_warn || config.log_info || config.log_debug         loglevel: config.log_info,           // enable / disable watching file , executing tests whenever file changes         autowatch: true,           // start these browsers         // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher         browsers: ['phantomjs_without_security'],          customlaunchers: {           phantomjs_without_security: {             base: 'phantomjs',             flags: ['--web-security=no']           }         },          // continuous integration mode         // if true, karma captures browsers, runs tests , exits         singlerun: false,          // concurrency level         // how many browser should started simultaneous         concurrency: infinity       })     } 

but when run tests using karma start karma.conf

i error

error: no provider "framework:pact"! (resolving: framework:pact)     @ error (c:\pactdemomaster\pactdemoandroidapp\node_modules\di\lib\injector.js:22:12)     @ object.parent.get (c:\pactdemomaster\pactdemoandroidapp\node_modules\di\lib\injector.js:9:13)     @ (c:\pactdemomaster\pactdemoandroidapp\node_modules\di\lib\injector.js:54:19)     @ c:\pactdemomaster\pactdemoandroidapp\node_modules\karma\lib\server.js:143:20     @ array.foreach (native)     @ server._start (c:\pactdemomaster\pactdemoandroidapp\node_modules\karma\lib\server.js:142:21)     @ invoke (c:\pactdemomaster\pactdemoandroidapp\node_modules\di\lib\injector.js:75:15)     @ server.start (c:\pactdemomaster\pactdemoandroidapp\node_modules\karma\lib\server.js:103:18)     @ object.exports.run (c:\pactdemomaster\pactdemoandroidapp\node_modules\karma\lib\cli.js:280:26)     @ requirecliandrun (c:\users\aajai_000\appdata\roaming\npm\node_modules\karma-cli\bin\karma:44:16)     @ c:\users\aajai_000\appdata\roaming\npm\node_modules\karma-cli\bin\karma:54:12     @ c:\users\aajai_000\appdata\roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:45:21     @ ondir (c:\users\aajai_000\appdata\roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:196:27)     @ c:\users\aajai_000\appdata\roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:163:39     @ onex (c:\users\aajai_000\appdata\roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:104:32)     @ c:\users\aajai_000\appdata\roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:24:24 

if can point me obvious problem...

regards

you're missing karma-pact plugin, not come default standard pact dependency.

see https://github.com/pact-foundation/karma-pact.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -