Skip to content

Commit

Permalink
test: pass prefix in describe scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf committed Oct 24, 2023
1 parent a50e91c commit afd4d38
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions tests/test_clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ import {
} from '../src/classes';
import { delay, removeAllQueueData } from '../src/utils';

const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';

describe('Cleaner', () => {
const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';
let queue: Queue;
let queueEvents: QueueEvents;
let queueName: string;
Expand Down
3 changes: 1 addition & 2 deletions tests/test_delay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import { v4 } from 'uuid';
import { Queue, Job, Worker, QueueEvents } from '../src/classes';
import { removeAllQueueData, delay } from '../src/utils';

const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';

describe('Delayed jobs', function () {
const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';
this.timeout(15000);

let queue: Queue;
Expand Down
3 changes: 1 addition & 2 deletions tests/test_getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import { v4 } from 'uuid';
import { FlowProducer, Queue, QueueEvents, Worker } from '../src/classes';
import { delay, removeAllQueueData } from '../src/utils';

const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';

describe('Jobs getters', function () {
const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';
let queue: Queue;
let queueName: string;
const connection = { host: 'localhost' };
Expand Down
3 changes: 1 addition & 2 deletions tests/test_job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import { Job, Queue, QueueEvents, Worker } from '../src/classes';
import { JobsOptions } from '../src/types';
import { delay, getParentKey, removeAllQueueData } from '../src/utils';

const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';

describe('Job', function () {
const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';
let queue: Queue;
let queueName: string;
const connection = { host: 'localhost' };
Expand Down
3 changes: 1 addition & 2 deletions tests/test_metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ const ONE_SECOND = 1000;
const ONE_MINUTE = 60 * ONE_SECOND;
const ONE_HOUR = 60 * ONE_MINUTE;

const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';

describe('metrics', function () {
const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';
this.timeout(10000);
let repeat: Repeat;
let queue: Queue;
Expand Down
3 changes: 1 addition & 2 deletions tests/test_queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import { v4 } from 'uuid';
import { FlowProducer, Job, Queue, Worker } from '../src/classes';
import { delay, removeAllQueueData } from '../src/utils';

const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';

describe('queues', function () {
const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';
const sandbox = sinon.createSandbox();

let queue: Queue;
Expand Down
3 changes: 1 addition & 2 deletions tests/test_stalled_jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import { beforeEach, describe, it } from 'mocha';
import { v4 } from 'uuid';
import { expect } from 'chai';

const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';

describe('stalled jobs', function () {
const prefix = process.env.BULLMQ_TEST_PREFIX || 'bull';
let queue: Queue;
let queueName: string;

Expand Down

0 comments on commit afd4d38

Please sign in to comment.