Skip to content

Commit

Permalink
Next attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
sanrai committed Sep 17, 2024
1 parent 8a0cce0 commit b23edc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 2 additions & 0 deletions libs/blocks/caas/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -741,9 +741,11 @@ export const getConfig = async (originalState, strs = {}) => {
headers: caasRequestHeaders,
};

// codecov-ignore-start
if (pageConfig.caasLinkTransformer) {
config.linkTransformer = pageConfig.caasLinkTransformer;
}

Check warning on line 747 in libs/blocks/caas/utils.js

View check run for this annotation

Codecov / codecov/patch

libs/blocks/caas/utils.js#L746-L747

Added lines #L746 - L747 were not covered by tests
// codecov-ignore-end
return config;
};

Expand Down
12 changes: 0 additions & 12 deletions test/blocks/caas/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,6 @@ describe('getConfig', () => {
},
];

it('does not include linkTransformer in config when caasLinkTransformer is not defined', async () => {
const cfg = { caasLinkTransformer: { enabled: true } };
setConfig(cfg);

const testState = { ...defaultState };
const testStrings = {};

const config = await getConfig(testState, testStrings);

expect(config).to.not.be.undefined;
});

it('should return a caas config object', async () => {
const config = await getConfig(state, strings);
expect(config).to.be.eql({
Expand Down

0 comments on commit b23edc4

Please sign in to comment.