• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

adobe / reactor-turbine / 26974271630

04 Jun 2026 07:23PM UTC coverage: 18.928% (-77.0%) from 95.912%
26974271630

Pull #201

github

web-flow
Merge 99f374fa8 into 4a42733a4
Pull Request #201: Platir 64071 update vulnerability chain

36 of 379 branches covered (9.5%)

Branch coverage included in aggregate %.

4 of 6 new or added lines in 1 file covered. (66.67%)

640 existing lines in 47 files now uncovered.

197 of 852 relevant lines covered (23.12%)

1.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

9.52
/src/rules/createAddConditionToQueue.js
1
/*
2
Copyright 2020 Adobe. All rights reserved.
3
This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
you may not use this file except in compliance with the License. You may obtain a copy
5
of the License at http://www.apache.org/licenses/LICENSE-2.0
6

7
Unless required by applicable law or agreed to in writing, software distributed under
8
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
OF ANY KIND, either express or implied. See the License for the specific language
10
governing permissions and limitations under the License.
11
*/
12

13
var Promise = require('@adobe/reactor-promise');
3✔
14

15
module.exports = function (
3✔
16
  executeDelegateModule,
17
  normalizeRuleComponentError,
18
  isConditionMet,
19
  logConditionError,
20
  logConditionNotMet
21
) {
UNCOV
22
  return function (condition, rule, syntheticEvent, lastPromiseInQueue) {
×
UNCOV
23
    return lastPromiseInQueue.then(function () {
×
24
      // This module is used when ruleComponentSequencing is enabled.
25
      // condition.timeout is always supplied to this module as >= 0.
26
      // Conditions always assume delayNext = true because we have to know the
27
      // condition result before moving on.
28
      var conditionTimeoutId;
29

UNCOV
30
      return new Promise(function (resolve, reject) {
×
UNCOV
31
        var moduleResult = executeDelegateModule(condition, syntheticEvent, [
×
32
          syntheticEvent
33
        ]);
34

UNCOV
35
        var promiseTimeoutMs = condition.timeout;
×
UNCOV
36
        var timeoutPromise = new Promise(function (resolve, reject) {
×
UNCOV
37
          conditionTimeoutId = setTimeout(function () {
×
UNCOV
38
            reject(
×
39
              new Error(
40
                'A timeout occurred because the condition took longer than ' +
41
                  promiseTimeoutMs / 1000 +
42
                  ' seconds to complete. '
43
              )
44
            );
45
          }, promiseTimeoutMs);
46
        });
47

UNCOV
48
        Promise.race([moduleResult, timeoutPromise]).then(resolve, reject);
×
49
      })
50
        .catch(function (e) {
UNCOV
51
          clearTimeout(conditionTimeoutId);
×
UNCOV
52
          e = normalizeRuleComponentError(e);
×
UNCOV
53
          logConditionError(condition, rule, e);
×
UNCOV
54
          return Promise.reject(e);
×
55
        })
56
        .then(function (result) {
UNCOV
57
          clearTimeout(conditionTimeoutId);
×
UNCOV
58
          if (!isConditionMet(condition, result)) {
×
UNCOV
59
            logConditionNotMet(condition, rule);
×
UNCOV
60
            return Promise.reject();
×
61
          }
62
        });
63
    });
64
  };
65
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc