Skip to content

Commit

Permalink
Removed additional testcases lit-ref.raw.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
raghul.kumar committed Oct 15, 2024
1 parent f8ef754 commit 7731f94
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 196 deletions.
137 changes: 0 additions & 137 deletions packages/core/src/__tests__/__snapshots__/lit.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3117,68 +3117,6 @@ export default class MyBasicComponent extends LitElement {
"
`;

exports[`Lit > jsx > Javascript Test > ref 1`] = `
"import { LitElement, html, css } from \\"lit\\";
import { customElement, property, state, query } from \\"lit/decorators.js\\";

@customElement(\\"my-icon\\")
export default class Icon extends LitElement {
createRenderRoot() {
return this;
}

@query('[ref=\\"hostRef\\"]')
hostRef!: HTMLElement;

@property() color: any;
@property() colorSecondary: any;
@property() ariaLabel: any;

setColors(colors) {
if (!this.hostRef) {
return;
}

if (colors.primary) {
this.hostRef.style.setProperty(\\"--color-primary\\", colors.primary);
} else {
this.hostRef.style.removeProperty(\\"--color-primary\\");
}

if (colors.secondary) {
this.hostRef.style.setProperty(\\"--color-secondary\\", colors.secondary);
} else {
this.hostRef.style.removeProperty(\\"--color-secondary\\");
}
}

connectedCallback() {
this.setColors({
primary: this.color,
secondary: this.colorSecondary,
});
}

updated() {
this.setColors({
primary: this.color,
secondary: this.colorSecondary,
});
}

render() {
return html\`

<div aria-label=\\"\${this.ariaLabel}\\" ref=\\"hostRef\\">
<svg viewBox=\\"0 0 24 24\\" fill=\\"none\\"></svg>
</div>

\`;
}
}
"
`;

exports[`Lit > jsx > Javascript Test > referencingFunInsideHook 1`] = `
"import { LitElement, html, css } from \\"lit\\";
import { customElement, property, state, query } from \\"lit/decorators.js\\";
Expand Down Expand Up @@ -7781,81 +7719,6 @@ export default class MyBasicComponent extends LitElement {
"
`;

exports[`Lit > jsx > Typescript Test > ref 1`] = `
"import { LitElement, html, css } from \\"lit\\";
import { customElement, property, state, query } from \\"lit/decorators.js\\";

type Colors = {
primary?: string;
secondary?: string;
};
interface IconProps {
icon: string;
size?: \\"xs\\" | \\"md\\" | number;
type?: \\"solid\\" | \\"line\\";
ariaLabel?: string;
color?: string;
colorSecondary?: string;
}

@customElement(\\"my-icon\\")
export default class Icon extends LitElement {
createRenderRoot() {
return this;
}

@query('[ref=\\"hostRef\\"]')
hostRef!: HTMLElement;

@property() color: any;
@property() colorSecondary: any;
@property() ariaLabel: any;

setColors(colors: Colors) {
if (!this.hostRef) {
return;
}

if (colors.primary) {
this.hostRef.style.setProperty(\\"--color-primary\\", colors.primary);
} else {
this.hostRef.style.removeProperty(\\"--color-primary\\");
}

if (colors.secondary) {
this.hostRef.style.setProperty(\\"--color-secondary\\", colors.secondary);
} else {
this.hostRef.style.removeProperty(\\"--color-secondary\\");
}
}

connectedCallback() {
this.setColors({
primary: this.color,
secondary: this.colorSecondary,
});
}

updated() {
this.setColors({
primary: this.color,
secondary: this.colorSecondary,
});
}

render() {
return html\`

<div aria-label=\\"\${this.ariaLabel}\\" ref=\\"hostRef\\">
<svg viewBox=\\"0 0 24 24\\" fill=\\"none\\"></svg>
</div>

\`;
}
}
"
`;

exports[`Lit > jsx > Typescript Test > referencingFunInsideHook 1`] = `
"import { LitElement, html, css } from \\"lit\\";
import { customElement, property, state, query } from \\"lit/decorators.js\\";
Expand Down
58 changes: 0 additions & 58 deletions packages/core/src/__tests__/data/lit-ref.raw.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/src/__tests__/test-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ const BASIC_TESTS: Tests = {
useTarget,
signalsOnUpdate,
getterState,
ref,
'string-literal-store': StringLiteralStore,
'string-literal-store-kebab': {
file: StringLiteralStoreKebab,
Expand Down

0 comments on commit 7731f94

Please sign in to comment.