Skip to content

Commit

Permalink
test(ssr): add fixture for computed prop exploding
Browse files Browse the repository at this point in the history
  • Loading branch information
wjhsf committed Dec 2, 2024
1 parent 5bd5ae0 commit c0ac093
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
get bothDecorated 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('get bothDecorated should not be called');
}

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

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

0 comments on commit c0ac093

Please sign in to comment.