Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(ssr): add fixture for computed prop exploding #4989

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
getter should not be called
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-wire';
export { default } from 'x/wire';
export * from 'x/wire';
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export class adapter {
constructor(dataCallback) {
this.dc = dataCallback;
}

connect() {}

update(config) {
this.dc(config.name);
}

disconnect() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
{exposedSymbol}
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { LightningElement, wire } from 'lwc';
import { adapter } from './adapter';
const sym = Symbol('computed prop');

export default class Wire extends LightningElement {
@wire(adapter, { name: 'symbol' })
get [sym]() {
throw new Error('getter should not be called');
}

@wire(adapter, { name: 'symbol' })
set [sym](v) {
throw new Error('setter should not be called');
}

get exposedSymbol() {
return this[sym];
}
}