Skip to content

Commit

Permalink
test: consistent fixture tests for disallowed @api props (#4045)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson authored Mar 12, 2024
1 parent 4a882bb commit 09f7b4c
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 14 deletions.
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
}
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"
}
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
}
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"
}
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
}
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"
}
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
}
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"
}

This file was deleted.

This file was deleted.

0 comments on commit 09f7b4c

Please sign in to comment.