-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: consistent fixture tests for disallowed
@api
props (#4045)
- Loading branch information
1 parent
4a882bb
commit 09f7b4c
Showing
10 changed files
with
46 additions
and
14 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...el-plugin-component/src/__tests__/fixtures/api-decorator/disallowed-props/class/actual.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,5 @@ | ||
import { LightningElement, api } from 'lwc' | ||
|
||
export default class extends LightningElement { | ||
@api class | ||
} |
10 changes: 10 additions & 0 deletions
10
...l-plugin-component/src/__tests__/fixtures/api-decorator/disallowed-props/class/error.json
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,10 @@ | ||
{ | ||
"message": "LWC1110: Invalid property name \"class\". \"class\" is a reserved attribute.", | ||
"loc": { | ||
"line": 4, | ||
"column": 2, | ||
"start": 95, | ||
"length": 10 | ||
}, | ||
"filename": "test.js" | ||
} |
5 changes: 5 additions & 0 deletions
5
...babel-plugin-component/src/__tests__/fixtures/api-decorator/disallowed-props/is/actual.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,5 @@ | ||
import { LightningElement, api } from 'lwc' | ||
|
||
export default class extends LightningElement { | ||
@api is | ||
} |
6 changes: 3 additions & 3 deletions
6
...s-error-if-property-name-is-is/error.json → ...-decorator/disallowed-props/is/error.json
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"message": "LWC1110: Invalid property name \"is\". \"is\" is a reserved attribute.", | ||
"loc": { | ||
"line": 3, | ||
"line": 4, | ||
"column": 2, | ||
"start": 100, | ||
"length": 8 | ||
"start": 95, | ||
"length": 7 | ||
}, | ||
"filename": "test.js" | ||
} |
5 changes: 5 additions & 0 deletions
5
...bel-plugin-component/src/__tests__/fixtures/api-decorator/disallowed-props/slot/actual.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,5 @@ | ||
import { LightningElement, api } from 'lwc' | ||
|
||
export default class extends LightningElement { | ||
@api slot | ||
} |
6 changes: 3 additions & 3 deletions
6
...wed-global-html-attribute-name/error.json → ...ecorator/disallowed-props/slot/error.json
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"message": "LWC1110: Invalid property name \"slot\". \"slot\" is a reserved attribute.", | ||
"loc": { | ||
"line": 3, | ||
"line": 4, | ||
"column": 2, | ||
"start": 100, | ||
"length": 10 | ||
"start": 95, | ||
"length": 9 | ||
}, | ||
"filename": "test.js" | ||
} |
5 changes: 5 additions & 0 deletions
5
...el-plugin-component/src/__tests__/fixtures/api-decorator/disallowed-props/style/actual.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,5 @@ | ||
import { LightningElement, api } from 'lwc' | ||
|
||
export default class extends LightningElement { | ||
@api style | ||
} |
10 changes: 10 additions & 0 deletions
10
...l-plugin-component/src/__tests__/fixtures/api-decorator/disallowed-props/style/error.json
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,10 @@ | ||
{ | ||
"message": "LWC1110: Invalid property name \"style\". \"style\" is a reserved attribute.", | ||
"loc": { | ||
"line": 4, | ||
"column": 2, | ||
"start": 95, | ||
"length": 10 | ||
}, | ||
"filename": "test.js" | ||
} |
4 changes: 0 additions & 4 deletions
4
...ows-error-if-property-name-conflicts-with-disallowed-global-html-attribute-name/actual.js
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...ponent/src/__tests__/fixtures/api-decorator/throws-error-if-property-name-is-is/actual.js
This file was deleted.
Oops, something went wrong.