diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/error-is-dynamic/actual.html b/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/error-is-dynamic/actual.html deleted file mode 100644 index 3184647666..0000000000 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/error-is-dynamic/actual.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/error-is-dynamic/expected.js b/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/error-is-dynamic/expected.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/error-is-dynamic/metadata.json b/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/error-is-dynamic/metadata.json deleted file mode 100644 index 251acf6e51..0000000000 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/error-is-dynamic/metadata.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "warnings": [ - { - "code": 1062, - "message": "LWC1062: \"is\" attribute value can't be an expression", - "level": 1, - "location": { - "line": 2, - "column": 13, - "start": 23, - "length": 30 - } - } - ], - "metadata": { - "definedSlots": [], - "templateUsedIds": [ - "dynamicCmp" - ], - "templateDependencies": [] - } -} \ No newline at end of file diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/actual.html b/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/actual.html index bf26b43c43..b4c3b8a5ce 100644 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/actual.html +++ b/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/actual.html @@ -24,9 +24,6 @@ -
-
-
diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/expected.js b/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/expected.js index 25ae61c5e9..fc7c46d4e8 100644 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/expected.js +++ b/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/expected.js @@ -1,8 +1,5 @@ import _nsFoo from "ns/foo"; import _nsBar from "ns/bar"; -import _nsBuzz from "ns/buzz"; -import _nsTable from "ns/table"; -import _nsInput from "ns/input"; import { registerTemplate, sanitizeAttribute } from "lwc"; function tmpl($api, $cmp, $slotset, $ctx) { @@ -77,7 +74,12 @@ function tmpl($api, $cmp, $slotset, $ctx) { "use", { attrs: { - "xlink:href": sanitizeAttribute("use", "http://www.w3.org/2000/svg", "xlink:href", "xx") + "xlink:href": sanitizeAttribute( + "use", + "http://www.w3.org/2000/svg", + "xlink:href", + "xx" + ) }, key: 6 }, @@ -85,60 +87,13 @@ function tmpl($api, $cmp, $slotset, $ctx) { ) ] ), - api_custom_element( - "div", - _nsBuzz, - { - attrs: { - is: "ns-buzz" - }, - props: { - bgColor: "x", - ariaHidden: "hidden" - }, - key: 7 - }, - [] - ), api_element( "table", { attrs: { bgcolor: "x" }, - key: 8 - }, - [] - ), - api_custom_element( - "table", - _nsTable, - { - attrs: { - is: "ns-table" - }, - props: { - bgColor: "x", - tabIndex: "0", - bar: "test", - min: "3" - }, - key: 9 - }, - [] - ), - api_custom_element( - "input", - _nsInput, - { - attrs: { - is: "ns-input" - }, - props: { - minLength: "3", - maxLength: "10" - }, - key: 10 + key: 7 }, [] ), @@ -149,7 +104,7 @@ function tmpl($api, $cmp, $slotset, $ctx) { attrs: { "aria-hidden": "hidden" }, - key: 11 + key: 8 }, [] ) diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/metadata.json b/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/metadata.json index 1a813445e1..5ce5a7f4e6 100644 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/metadata.json +++ b/packages/@lwc/template-compiler/src/__tests__/fixtures/attributes/mixed-props-attrs/metadata.json @@ -54,56 +54,6 @@ "value": "blue" } } - }, - { - "moduleName": "ns/buzz", - "tagName": "div", - "properties": { - "bgColor": { - "type": "literal", - "value": "x" - }, - "ariaHidden": { - "type": "literal", - "value": "hidden" - } - } - }, - { - "moduleName": "ns/table", - "tagName": "table", - "properties": { - "bgColor": { - "type": "literal", - "value": "x" - }, - "tabIndex": { - "type": "literal", - "value": "0" - }, - "bar": { - "type": "literal", - "value": "test" - }, - "min": { - "type": "literal", - "value": "3" - } - } - }, - { - "moduleName": "ns/input", - "tagName": "input", - "properties": { - "minLength": { - "type": "literal", - "value": "3" - }, - "maxLength": { - "type": "literal", - "value": "10" - } - } } ] } diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is-with-other-directives/actual.html b/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is-with-other-directives/actual.html deleted file mode 100644 index 5a7ed81888..0000000000 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is-with-other-directives/actual.html +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is-with-other-directives/expected.js b/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is-with-other-directives/expected.js deleted file mode 100644 index 15ca690bf7..0000000000 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is-with-other-directives/expected.js +++ /dev/null @@ -1,45 +0,0 @@ -import _nsRow from "ns/row"; -import { registerTemplate } from "lwc"; - -function tmpl($api, $cmp, $slotset, $ctx) { - const { - k: api_key, - c: api_custom_element, - i: api_iterator, - h: api_element - } = $api; - return [ - api_element( - "table", - { - key: 2 - }, - [ - api_element( - "tbody", - { - key: 3 - }, - api_iterator($cmp.rows, function(row) { - return row.visible - ? api_custom_element( - "tr", - _nsRow, - { - attrs: { - is: "ns-row" - }, - key: api_key(4, row.id) - }, - [] - ) - : null; - }) - ) - ] - ) - ]; -} - -export default registerTemplate(tmpl); -tmpl.stylesheets = []; diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is-with-other-directives/metadata.json b/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is-with-other-directives/metadata.json deleted file mode 100644 index e0fe26258d..0000000000 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is-with-other-directives/metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "warnings": [], - "metadata": { - "definedSlots": [], - "templateUsedIds": [ - "rows" - ], - "templateDependencies": [ - { - "moduleName": "ns/row", - "tagName": "tr" - } - ] - } -} \ No newline at end of file diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is/actual.html b/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is/actual.html deleted file mode 100644 index b2e5d9b3a5..0000000000 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is/actual.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is/expected.js b/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is/expected.js deleted file mode 100644 index 5ad92e6787..0000000000 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is/expected.js +++ /dev/null @@ -1,38 +0,0 @@ -import _nsRow from "ns/row"; -import { registerTemplate } from "lwc"; - -function tmpl($api, $cmp, $slotset, $ctx) { - const { c: api_custom_element, h: api_element } = $api; - return [ - api_element( - "table", - { - key: 2 - }, - [ - api_element( - "tbody", - { - key: 3 - }, - [ - api_custom_element( - "tr", - _nsRow, - { - attrs: { - is: "ns-row" - }, - key: 4 - }, - [] - ) - ] - ) - ] - ) - ]; -} - -export default registerTemplate(tmpl); -tmpl.stylesheets = []; diff --git a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is/metadata.json b/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is/metadata.json deleted file mode 100644 index e10a6e4357..0000000000 --- a/packages/@lwc/template-compiler/src/__tests__/fixtures/directive-is/is/metadata.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "warnings": [], - "metadata": { - "definedSlots": [], - "templateUsedIds": [], - "templateDependencies": [ - { - "moduleName": "ns/row", - "tagName": "tr" - } - ] - } -} \ No newline at end of file diff --git a/packages/@lwc/template-compiler/src/__tests__/parser.spec.ts b/packages/@lwc/template-compiler/src/__tests__/parser.spec.ts index 8d5b3f7e03..f50378d4e7 100644 --- a/packages/@lwc/template-compiler/src/__tests__/parser.spec.ts +++ b/packages/@lwc/template-compiler/src/__tests__/parser.spec.ts @@ -546,21 +546,6 @@ describe('props and attributes', () => { 'data-xx': { value: 'foo' }, }); }); - - it('custom element using is with attribute / prop mix', () => { - const { root } = parseTemplate(``); - expect(root.children[0].props).toMatchObject({ - bar: { value: 'test' }, - min: { value: '3' }, - bgColor: { value: 'x' }, - tabIndex: { value: '2' }, - }); - expect(root.children[0].attrs).toMatchObject({ - is: { value: 'x-table' }, - }); - }); }); describe('metadata', () => { @@ -582,15 +567,6 @@ describe('metadata', () => { expect(Array.from(state.ids)).toEqual(['state', 'componentProp']); }); - it('dependent component', () => { - const { state } = parseTemplate(``); - - expect(Array.from(state.dependencies)).toEqual(['x-menu', 'x-button']); - }); - it('slots', () => { const { state } = parseTemplate(`