<commit_before>const chai = require('chai');
chai.use(require('sinon-chai'));
const expect = chai.expect;
const sinon = require('sinon');

module.exports = fetchMock => {
	describe('repeat and done()', () => {
		let fm;
		before(() => {
			fm = fetchMock.createInstance();
			fm.config.warnOnUnmatched = false;
		});

		afterEach(() => fm.restore());

		it('can expect a route to be called', async () => {
			fm.mock('http://it.at.there1/', 200);

			expect(fm.done()).to.be.false;
			expect(fm.done('http://it.at.there1/')).to.be.false;
			fm.fetchHandler('http://it.at.there1/');
			expect(fm.done()).to.be.true;
			expect(fm.done('http://it.at.there1/')).to.be.true;
		});

		it('can expect a route to be called n times', async () => {
			fm.mock('http://it.at.there1/', 200, { repeat: 2 });

			fm.fetchHandler('http://it.at.there1/');
			expect(fm.done()).to.be.false;
			expect(fm.done('http://it.at.there1/')).to.be.false;
			fm.fetchHandler('http://it.at.there1/');
			expect(fm.done()).to.be.true;
			expect(fm.done('http://it.at.there1/')).to.be.true;<commit_msg>implementing more sensible filter with options<commit_after>const chai = require('chai');
chai.use(require('sinon-chai'));
const expect = chai.expect;
const sinon = require('sinon');

module.exports = fetchMock => {
	describe.skip('repeat and done()', () => {
		let fm;
		before(() => {
			fm = fetchMock.createInstance();
			fm.config.warnOnUnmatched = false;
		});

		afterEach(() => fm.restore());

		it('can expect a route to be called', async () => {
			fm.mock('http://it.at.there1/', 200);

			expect(fm.done()).to.be.false;
			expect(fm.done('http://it.at.there1/')).to.be.false;
			fm.fetchHandler('http://it.at.there1/');
			expect(fm.done()).to.be.true;
			expect(fm.done('http://it.at.there1/')).to.be.true;
		});

		it('can expect a route to be called n times', async () => {
			fm.mock('http://it.at.there1/', 200, { repeat: 2 });

			fm.fetchHandler('http://it.at.there1/');
			expect(fm.done()).to.be.false;
			expect(fm.done('http://it.at.there1/')).to.be.false;
			fm.fetchHandler('http://it.at.there1/');
			expect(fm.done()).to.be.true;
			expect(fm.done('http://it.at.there1/')).to.be.true;
{'fraction_non_alphanumeric': 0.2413003663003663, 'fraction_numerical': 0.014652014652014652, 'mean_word_length': 3.5238095238095237, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '4500849', 'n_tokens_mistral': 913, 'n_tokens_neox': 816, 'n_words': 122}