<commit_before># Pact Consumer Javascript DSL

_This DSL is in very early stages of development, please bear with us as we give it some polish. Please raise any problems you have in the github issues. Check out the [Development Roadmap](/ROADMAP.md) to see where we are headed._

This codebase provides a Javascript DSL for creating pacts. If you are new to Pact, please read the Pact [README](pact-readme) first.

This DSL relies on the Ruby [pact-mock_service][pact-mock-service] gem to provide the mock service for the Javascript tests. If you do not want to use Ruby in your project, please read about using a standalone Pact mock service [here][pact-mock-service-without-ruby].

### Getting Help

* Please see the [wiki](https://github.com/DiUS/pact-consumer-js-dsl/wiki) for documentation (eg. using CORS, using the DSL on Windows).
* Google users group: https://groups.google.com/forum/#!forum/pact-support
* Twitter: [@pact_up](https://twitter.com/pact_up)

### Installing pact-mock-service

* If on Windows, please refer to the [Installing pact-mock-service on Windows](https://github.com/bethesque/pact-mock_service/wiki/Installing-the-pact-mock_service-gem-on-Windows)

1. You must install [Ruby](https://www.ruby-lang.org/en/downloads/) and [RubyGems](https://rubygems.org/pages/download) first.

1. After these binaries are available in the console, you can install the mock service by creating a Gemfile as shown below (this is the Ruby equivalent of package.json), then running `gem install bundler && bundle install` (the equivalent of npm install).

* Note: Windows users must run the install command after following Wiki instructions

```
source 'https://rubygems.org'
gem 'pact-mock_service', '~> 0.2.4'

```

### Getting Started (with Karma, Jasmine and pact-mock-service)

1. Install and configure Karma with Jasmine

  1. Create a `package.json` if you don't have one already - use `npm init` if you don't

  1. Install Karma using their [installation instructions](http://karma-runner.github.io/0.12/intro/installation.html)

    This basically consists of running,

    ```
    npm install karma karma-jasmine karma-chrome-launcher --save-dev
    npm install -g karma-cli<commit_msg>Bump pact-mock_service gem version<commit_after># Pact Consumer Javascript DSL

_This DSL is in very early stages of development, please bear with us as we give it some polish. Please raise any problems you have in the github issues. Check out the [Development Roadmap](/ROADMAP.md) to see where we are headed._

This codebase provides a Javascript DSL for creating pacts. If you are new to Pact, please read the Pact [README](pact-readme) first.

This DSL relies on the Ruby [pact-mock_service][pact-mock-service] gem to provide the mock service for the Javascript tests. If you do not want to use Ruby in your project, please read about using a standalone Pact mock service [here][pact-mock-service-without-ruby].

### Getting Help

* Please see the [wiki](https://github.com/DiUS/pact-consumer-js-dsl/wiki) for documentation (eg. using CORS, using the DSL on Windows).
* Google users group: https://groups.google.com/forum/#!forum/pact-support
* Twitter: [@pact_up](https://twitter.com/pact_up)

### Installing pact-mock-service

* If on Windows, please refer to the [Installing pact-mock-service on Windows](https://github.com/bethesque/pact-mock_service/wiki/Installing-the-pact-mock_service-gem-on-Windows)

1. You must install [Ruby](https://www.ruby-lang.org/en/downloads/) and [RubyGems](https://rubygems.org/pages/download) first.

1. After these binaries are available in the console, you can install the mock service by creating a Gemfile as shown below (this is the Ruby equivalent of package.json), then running `gem install bundler && bundle install` (the equivalent of npm install).

* Note: Windows users must run the install command after following Wiki instructions

```
source 'https://rubygems.org'
gem 'pact-mock_service', '~> 0.4.1'

```

### Getting Started (with Karma, Jasmine and pact-mock-service)

1. Install and configure Karma with Jasmine

  1. Create a `package.json` if you don't have one already - use `npm init` if you don't

  1. Install Karma using their [installation instructions](http://karma-runner.github.io/0.12/intro/installation.html)

    This basically consists of running,

    ```
    npm install karma karma-jasmine karma-chrome-launcher --save-dev
    npm install -g karma-cli
{'fraction_non_alphanumeric': 0.1012401352874859, 'fraction_numerical': 0.00496054114994363, 'mean_word_length': 4.312574850299401, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 14, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7069216', 'n_tokens_mistral': 1386, 'n_tokens_neox': 1278, 'n_words': 516}