We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 651d086 commit 8f8cb88Copy full SHA for 8f8cb88
tests/test_getters.ts
@@ -120,9 +120,14 @@ describe('Jobs getters', function () {
120
const nextWorkers = await queue.getWorkers();
121
expect(nextWorkers).to.have.length(2);
122
123
+ const rawnames = nextWorkers.map(nextWorker => {
124
+ const workerValues = nextWorker.rawname.split(':');
125
+ return workerValues[workerValues.length - 1];
126
+ });
127
+
128
// Check that the worker names are included in the response on the rawname property
- expect(nextWorkers[0].rawname.endsWith('worker1')).to.be.true;
- expect(nextWorkers[1].rawname.endsWith('worker2')).to.be.true;
129
+ expect(rawnames).to.include('worker1');
130
+ expect(rawnames).to.include('worker2');
131
132
await worker.close();
133
await worker2.close();
0 commit comments