Skip to content

Commit

Permalink
chore(@lwc/compiler): fix type error in transform-html.spec.ts (#5158)
Browse files Browse the repository at this point in the history
  • Loading branch information
cardoso authored Jan 22, 2025
1 parent 0cbf753 commit a88ebeb
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { APIVersion, noop } from '@lwc/shared';
import { transformSync } from '../transformer';
import type { TransformOptions } from '../../options';

const TRANSFORMATION_OPTIONS: TransformOptions = {
const TRANSFORMATION_OPTIONS = {
namespace: 'x',
name: 'foo',
};
} satisfies TransformOptions;

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

0 comments on commit a88ebeb

Please sign in to comment.