<commit_before>'use strict'

const provider = require('./support/provider')
const jackal = require('./support/jackal')
const client = require('./support/client')

describe('Happy path tests', function() {
  before((done) => jackal.start({}, done))
  after(jackal.stop)
  after(provider.stop)

  it('The provider should start successfully', function(done){
    provider.start({ port: 5000, contract: { version: '1' } }, done)
  })

  xit('Sending contract-v1 the first time should pass', function(done) {
    client.send({ filePath: 'test/integration/contract-v1.json', isPass: true }, done)
  })

  xit('Sending contract-v1 a second time should pass', function(done) {
    client.send({ filePath: 'test/integration/contract-v1.json', isPass: true }, done)
  })

  xit('Sending contract-v1 a third time should pass', function(done) {
    client.send({ filePath: 'test/integration/contract-v1.json', isPass: true }, done)
  })

  xit('Jackal should have hit "/contract" 3 times', function() {
    expect(provider.contractHitCount()).to.equal(3)
  })

  xit('The provider should stop successfully', function(done) {
    provider.stop(done)
  })

  xit('The provider should start successfully with contract-v2', function(done){
    provider.start({ port: 5000, contract: { version: 'abc' } }, done)
  })

  xit('The existing contract-v1 should fail for the provider with contract-v2', function(done){
    client.run({ provider: 'integration', isPass: false }, done)
  })

  xit('Sending contract-v2 should pass', function(done) {
    client.send({ filePath: 'test/integration/contract-v2.json', isPass: true }, done)
  })

  xit('Running contract-v2 the first time should pass', function(done) {
    client.run({ provider: 'integration', isPass: true }, done)
  })

  xit('Running contract-v2 a second time should pass', function(done) {
    client.run({ provider: 'integration', isPass: true }, done)
  })

  xit('Running contract-v2 a third time should pass', function(done) {
    client.run({ provider: 'integration', isPass: true }, done)
  })

  xit('Jackal should have hit "/contract" 5 times', function() {
    expect(provider.contractHitCount()).to.equal(5)
  })
})<commit_msg>Uncommented API tests<commit_after>'use strict'

const provider = require('./support/provider')
const jackal = require('./support/jackal')
const client = require('./support/client')

describe('Happy path tests', function() {
  before((done) => jackal.start({}, done))
  after(jackal.stop)
  after(provider.stop)

  it('The provider should start successfully', function(done){
    provider.start({ port: 5000, contract: { version: '1' } }, done)
  })

  it('Sending contract-v1 the first time should pass', function(done) {
    client.send({ filePath: 'test/integration/contract-v1.json', isPass: true }, done)
  })

  it('Sending contract-v1 a second time should pass', function(done) {
    client.send({ filePath: 'test/integration/contract-v1.json', isPass: true }, done)
  })

  it('Sending contract-v1 a third time should pass', function(done) {
    client.send({ filePath: 'test/integration/contract-v1.json', isPass: true }, done)
  })

  it('Jackal should have hit "/contract" 3 times', function() {
    expect(provider.contractHitCount()).to.equal(3)
  })

  it('The provider should stop successfully', function(done) {
    provider.stop(done)
  })

  it('The provider should start successfully with contract-v2', function(done){
    provider.start({ port: 5000, contract: { version: 'abc' } }, done)
  })

  it('The existing contract-v1 should fail for the provider with contract-v2', function(done){
    client.run({ provider: 'integration', isPass: false }, done)
  })

  it('Sending contract-v2 should pass', function(done) {
    client.send({ filePath: 'test/integration/contract-v2.json', isPass: true }, done)
  })

  it('Running contract-v2 the first time should pass', function(done) {
    client.run({ provider: 'integration', isPass: true }, done)
  })

  it('Running contract-v2 a second time should pass', function(done) {
    client.run({ provider: 'integration', isPass: true }, done)
  })

  it('Running contract-v2 a third time should pass', function(done) {
    client.run({ provider: 'integration', isPass: true }, done)
  })

  it('Jackal should have hit "/contract" 5 times', function() {
    expect(provider.contractHitCount()).to.equal(5)
  })
})
{'fraction_non_alphanumeric': 0.15695273061037174, 'fraction_numerical': 0.012391005048187242, 'mean_word_length': 4.309378806333739, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5919201', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1296, 'n_words': 372}