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

adobe / reactor-turbine-edge / 8443711332

26 Mar 2024 10:27PM UTC coverage: 94.005% (-5.0%) from 98.974%
8443711332

push

github

dompuiu
3.0.1

74 of 84 branches covered (88.1%)

Branch coverage included in aggregate %.

271 of 283 relevant lines covered (95.76%)

9761.78 hits per line

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

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

12
const constants = require('../constants');
4✔
13

14
const { CORE } = constants;
4✔
15

16
module.exports = (context) => {
4✔
17
  const { arcAndUtils, delegateConfig, env } = context;
11✔
18
  const { utils } = arcAndUtils;
11✔
19
  const {
20
    extension: {
21
      getExtensionSettings = () => Promise.resolve({}),
9✔
22
      name: extensionName
23
    },
24
    getSettings = () => Promise.resolve({}),
×
25
    moduleExports,
26
    id,
27
    name
28
  } = delegateConfig;
11✔
29

30
  return Promise.all([getSettings(context), getExtensionSettings(context)])
11✔
31
    .then(([settings, extensionSettings]) =>
32
      moduleExports({
11✔
33
        ...arcAndUtils,
34
        utils: {
35
          ...utils,
36
          getSettings: () => settings,
7✔
37
          getExtensionSettings: () => extensionSettings,
2✔
38
          getComponent: () => ({ id, name }),
1✔
39
          getEnv: extensionName === CORE ? () => env : () => ({})
✔
40
        }
41
      })
42
    )
43
    .then((moduleOutput) => ({
11✔
44
      ...context,
45
      moduleOutput
46
    }));
47
};
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

© 2025 Coveralls, Inc