<commit_before>/* eslint-disable promise/no-callback-in-promise */
const chai = require('chai');
const LockingQueue = require('./lockingQueue');

const { expect } = chai;

describe.only('lockingQueue', () => {
	it('should lock and resolve the returned promise immediatly', (done) => {
		const lockingQueue = new LockingQueue();
		const promise1 = lockingQueue.getLock();
		expect(lockingQueue.locked).to.be.true;
		promise1
			.then(() => {
				return done();
			})
			.catch(() => {
				expect.fail('unexpected failed promise');<commit_msg>SC-8691 remove .only from test<commit_after>/* eslint-disable promise/no-callback-in-promise */
const chai = require('chai');
const LockingQueue = require('./lockingQueue');

const { expect } = chai;

describe('lockingQueue', () => {
	it('should lock and resolve the returned promise immediatly', (done) => {
		const lockingQueue = new LockingQueue();
		const promise1 = lockingQueue.getLock();
		expect(lockingQueue.locked).to.be.true;
		promise1
			.then(() => {
				return done();
			})
			.catch(() => {
				expect.fail('unexpected failed promise');
{'fraction_non_alphanumeric': 0.16544789762340037, 'fraction_numerical': 0.007312614259597806, 'mean_word_length': 4.264423076923077, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '3943889', 'n_tokens_mistral': 379, 'n_tokens_neox': 332, 'n_words': 79}