Skip to content

Commit

Permalink
test: do not pass async to forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Feb 21, 2025
1 parent 310b497 commit c0aef63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions test/spec/provider/bpmn/SignalProps.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('provider/bpmn - SignalProps', function() {
elementRegistry.get('IntermediateThrowEvent_1')
];

plainElements.forEach(async (ele) => {
for (const ele of plainElements) {

// when
await act(() => {
Expand All @@ -77,7 +77,7 @@ describe('provider/bpmn - SignalProps', function() {
// then
const signalRefSelect = domQuery('select[name=signalRef]', container);
expect(signalRefSelect).to.be.null;
});
}

})
);
Expand All @@ -94,7 +94,7 @@ describe('provider/bpmn - SignalProps', function() {
elementRegistry.get('SignalCatchEvent_1')
];

signalElements.forEach(async (ele) => {
for (const ele of signalElements) {

// when
await act(() => {
Expand All @@ -104,7 +104,7 @@ describe('provider/bpmn - SignalProps', function() {
// then
const signalRefSelect = domQuery('select[name=signalRef]', container);
expect(signalRefSelect.value).to.eql(getSignal(ele).get('id'));
});
}
}));


Expand Down Expand Up @@ -290,7 +290,7 @@ describe('provider/bpmn - SignalProps', function() {
elementRegistry.get('IntermediateThrowEvent_1')
];

plainElements.forEach(async (ele) => {
for (const ele of plainElements) {

// when
await act(() => {
Expand All @@ -301,7 +301,7 @@ describe('provider/bpmn - SignalProps', function() {
const signalNameInput = domQuery('input[name=signalName]', container);

expect(signalNameInput).to.be.null;
});
}
})
);

Expand All @@ -317,7 +317,7 @@ describe('provider/bpmn - SignalProps', function() {
elementRegistry.get('SignalCatchEvent_1')
];

signalElements.forEach(async (ele) => {
for (const ele of signalElements) {
await act(() => {
selection.select(ele);
});
Expand All @@ -327,7 +327,7 @@ describe('provider/bpmn - SignalProps', function() {

// then
expect(signalNameInput.value).to.eql(getSignal(ele).get('name'));
});
}
}));


Expand Down
4 changes: 2 additions & 2 deletions test/spec/provider/zeebe/ConditionProps.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('provider/zeebe - ConditionProps', function() {
// given
const elements = [ 'Flow2', 'Flow3', 'Flow4' ];

elements.forEach(async ele => {
for (const ele of elements) {
const sequenceFlow = elementRegistry.get(ele);

// when
Expand All @@ -75,7 +75,7 @@ describe('provider/zeebe - ConditionProps', function() {

// then
expect(conditionExpressionInput).to.exist;
});
}
}));


Expand Down

0 comments on commit c0aef63

Please sign in to comment.