-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(ssr): add fixture for computed prop exploding
- Loading branch information
Showing
6 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...es/@lwc/engine-server/src/__tests__/fixtures/wire/errors/throws-on-computed-key/error.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
get bothDecorated should not be called |
Empty file.
3 changes: 3 additions & 0 deletions
3
...ges/@lwc/engine-server/src/__tests__/fixtures/wire/errors/throws-on-computed-key/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
13 changes: 13 additions & 0 deletions
13
...erver/src/__tests__/fixtures/wire/errors/throws-on-computed-key/modules/x/wire/adapter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() {} | ||
} |
3 changes: 3 additions & 0 deletions
3
...server/src/__tests__/fixtures/wire/errors/throws-on-computed-key/modules/x/wire/wire.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
{exposedSymbol} | ||
</template> |
19 changes: 19 additions & 0 deletions
19
...e-server/src/__tests__/fixtures/wire/errors/throws-on-computed-key/modules/x/wire/wire.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; | ||
} | ||
} |