Skip to content

Commit a88ebeb

Browse files
authored
chore(@lwc/compiler): fix type error in transform-html.spec.ts (#5158)
1 parent 0cbf753 commit a88ebeb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/@lwc/compiler/src/transformers/__tests__/transform-html.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import { APIVersion, noop } from '@lwc/shared';
99
import { transformSync } from '../transformer';
1010
import type { TransformOptions } from '../../options';
1111

12-
const TRANSFORMATION_OPTIONS: TransformOptions = {
12+
const TRANSFORMATION_OPTIONS = {
1313
namespace: 'x',
1414
name: 'foo',
15-
};
15+
} satisfies TransformOptions;
1616

1717
describe('transformSync', () => {
1818
it('should throw when processing an invalid HTML file', () => {
@@ -74,7 +74,10 @@ describe('transformSync', () => {
7474
];
7575
it.for(configs)('$name', ({ config, expected }) => {
7676
const template = `<template><img src="http://example.com/img.png" crossorigin="anonymous"></template>`;
77-
const { code, warnings } = transformSync(template, 'foo.html', config);
77+
const { code, warnings } = transformSync(template, 'foo.html', {
78+
...TRANSFORMATION_OPTIONS,
79+
...config,
80+
});
7881
expect(warnings!.length).toBe(0);
7982
if (expected) {
8083
expect(code).toContain('<img');

0 commit comments

Comments
 (0)