• 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

24.14
/src/createGetSharedModuleExports.js
1
/***************************************************************************************
2
 * (c) 2017 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 validateInjectedParams = require('./helpers/validate-injected-params');
3✔
14

15
function injectCreateGetSharedModuleExports({ logger }) {
16
  /**
17
   * Creates a function that, when called with an extension name and module name, will return the
18
   * exports of the respective shared module.
19
   *
20
   * @param {Object} extensions
21
   * @param {Object} moduleProvider
22
   * @returns {Function}
23
   */
24
  return function createGetSharedModuleExports(extensions, moduleProvider) {
6✔
UNCOV
25
    return function getSharedModuleExports(extensionName, moduleName) {
×
UNCOV
26
      var extension = extensions[extensionName];
×
27

UNCOV
28
      if (extension) {
×
UNCOV
29
        var modules = extension.modules;
×
UNCOV
30
        if (modules) {
×
UNCOV
31
          var referencePaths = Object.keys(modules);
×
UNCOV
32
          for (var i = 0; i < referencePaths.length; i++) {
×
UNCOV
33
            var referencePath = referencePaths[i];
×
UNCOV
34
            var module = modules[referencePath];
×
UNCOV
35
            if (module.shared && module.name === moduleName) {
×
UNCOV
36
              return moduleProvider.getModuleExports(referencePath);
×
37
            }
38
          }
UNCOV
39
          logger.error(
×
40
            `The module "${moduleName}" does not exist in the shared modules of the "${extensionName}" extension`
41
          );
42
        }
43
      } else {
UNCOV
44
        logger.error(
×
45
          `The extension "${extensionName}" is not bundled with the library."`
46
        );
47
      }
48
    };
49
  };
50
}
51

52
const validateInjection = validateInjectedParams(
3✔
53
  injectCreateGetSharedModuleExports
54
);
55

56
module.exports = validateInjection({
3✔
57
  logger: require('./logger')
58
});
59

60
if (REACTOR_KARMA_CI_UNIT_TEST_MODE) {
3!
61
  /* START.TESTS_ONLY */
62
  module.exports.injectCreateGetSharedModuleExports =
3✔
63
    injectCreateGetSharedModuleExports;
64
  /* END.TESTS_ONLY */
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