<commit_before>'use strict';

const stampit = require('stampit');
const API = require('./core/api');
const UI = require('./ui');
const Reporter = require('./reporter');
const debug = require('debug')('mocha:mocha');

const Mocha = stampit({
  refs: {
    ui: require('mocha-ui-bdd')
  },
  methods: {
    start() {

    },
    run() {
      this.emit('pre-run');
      return this.loadPlugins()
        .then(plugins => {
          debug(`Loaded plugins ${plugins}`);
          this.emit('ready');
        })
        .return(this);
    },
    createUI() {
      return UI({mocha: this});
    },
    createReporter() {
      return Reporter({mocha: this});
    },
    createAPI() {
      return API({mocha: this});
    }
  }
})
  .compose(API)
  .init(function initMocha({stamp}) {
    this.use(this.ui);
    this.Mocha = stamp;
  });

module.exports = Mocha;<commit_msg>update mocha.js to use Pluggable<commit_after>'use strict';

const stampit = require('stampit');
const Pluggable = require('./core/pluggable');
const UI = require('./ui');
const Reporter = require('./reporter');

const Mocha = stampit({
  refs: {
    ui: require('mocha-ui-bdd')
  },
  methods: {
    run() {
    },
    createUI() {
      return UI({mocha: this});
    },
    createReporter() {
      return Reporter({mocha: this});
    }
  }
})
  .compose(Pluggable)
  .init(function initMocha({stamp}) {
    this.use(this.ui);
    this.Mocha = stamp;
  });

module.exports = Mocha;
{'fraction_non_alphanumeric': 0.18926359256710254, 'fraction_numerical': 0.0, 'mean_word_length': 2.7282051282051283, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '6364140', 'n_tokens_mistral': 519, 'n_tokens_neox': 494, 'n_words': 96}