<commit_before>'use strict';

require('should');
const sinon = require('sinon');
const EventEmitter = require('events');
const createDeployNotesSubscriber = require('../../../../../core/services/checkers/deploy-notes/deployNotesSubscriber');
const createDeployNotesService = require('../../../../../core/services/checkers/deploy-notes/deployNotesService');

describe('Deploy notes subscriber', () => {
  function createDeployNotesCheckerDummy(result) {
    return {
      checkPullRequest: (prInfo, cb) => {
        cb(null, result);
      }
    };
  }

  function createGithubDummy(result) {
    return {
      getPullRequest: (repo, issue, cb) => {
        cb(null, result);
      },
      updateCommitStatus: (status, cb) => {
        cb(null, result);
      }
    };
  }

  context('Interface', () => {
    const deployNotesSubscriber = createDeployNotesSubscriber();
    it('should have the "subscribe" method', () => {
      deployNotesSubscriber.subscribe.should.be.a.Function();
    });
  });

  context('Behaviour', () => {
    it('should subscribe to the "pull_request" event', done => {
      const emitter = new EventEmitter();
      const spy = sinon.spy(emitter, 'on');
      const deployNotesSubscriber = createDeployNotesSubscriber(emitter);<commit_msg>Fix tests stub<commit_after>'use strict';

require('should');
const sinon = require('sinon');
const EventEmitter = require('events');
const createDeployNotesSubscriber = require('../../../../../core/services/checkers/deploy-notes/deployNotesSubscriber');
const createDeployNotesService = require('../../../../../core/services/checkers/deploy-notes/deployNotesService');

describe('Deploy notes subscriber', () => {
  function createDeployNotesCheckerDummy(result) {
    return {
      checkPullRequest: (repo, prInfo, cb) => {
        cb(null, result);
      }
    };
  }

  function createGithubDummy(result) {
    return {
      getPullRequest: (repo, issue, cb) => {
        cb(null, result);
      },
      updateCommitStatus: (status, cb) => {
        cb(null, result);
      }
    };
  }

  context('Interface', () => {
    const deployNotesSubscriber = createDeployNotesSubscriber();
    it('should have the "subscribe" method', () => {
      deployNotesSubscriber.subscribe.should.be.a.Function();
    });
  });

  context('Behaviour', () => {
    it('should subscribe to the "pull_request" event', done => {
      const emitter = new EventEmitter();
      const spy = sinon.spy(emitter, 'on');
      const deployNotesSubscriber = createDeployNotesSubscriber(emitter);
{'fraction_non_alphanumeric': 0.1638506876227898, 'fraction_numerical': 0.0, 'mean_word_length': 3.3595890410958904, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '4334164', 'n_tokens_mistral': 775, 'n_tokens_neox': 730, 'n_words': 140}