Skip to content

Commit

Permalink
another one
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Aug 3, 2023
1 parent 21ef1fa commit 0c0f78c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/compiler/config/test/validate-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,19 +401,22 @@ describe('validation', () => {
expect(config.extras.appendChildSlotFix).toBe(true);
expect(config.extras.cloneNodeFix).toBe(true);
expect(config.extras.slotChildNodesFix).toBe(true);
expect(config.extras.scopedSlotTextContentFix).toBe(true);
});

it('should override slot fix config based on `experimentalSlotFixes`', () => {
userConfig.extras = {
appendChildSlotFix: false,
slotChildNodesFix: false,
cloneNodeFix: false,
scopedSlotTextContentFix: false,
};
userConfig.extras.experimentalSlotFixes = true;
const { config } = validateConfig(userConfig, bootstrapConfig);
expect(config.extras.appendChildSlotFix).toBe(true);
expect(config.extras.cloneNodeFix).toBe(true);
expect(config.extras.slotChildNodesFix).toBe(true);
expect(config.extras.scopedSlotTextContentFix).toBe(true);
});

it('should set taskQueue "async" by default', () => {
Expand Down
1 change: 1 addition & 0 deletions src/compiler/config/validate-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const validateConfig = (
validatedConfig.extras.appendChildSlotFix = true;
validatedConfig.extras.cloneNodeFix = true;
validatedConfig.extras.slotChildNodesFix = true;
validatedConfig.extras.scopedSlotTextContentFix = true;
}

validatedConfig.buildEs5 =
Expand Down

0 comments on commit 0c0f78c

Please sign in to comment.