Skip to content

Commit

Permalink
test: add fixture test
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson committed Aug 22, 2024
1 parent c2514fa commit 49c0252
Show file tree
Hide file tree
Showing 10 changed files with 378 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<button onclick={onClick} ontouchstart={onTouchStart} ontouchend={onTouchEnd}></button>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
{
"root": {
"type": "Root",
"location": {
"startLine": 1,
"startColumn": 1,
"endLine": 3,
"endColumn": 12,
"start": 0,
"end": 114,
"startTag": {
"startLine": 1,
"startColumn": 1,
"endLine": 1,
"endColumn": 11,
"start": 0,
"end": 10
},
"endTag": {
"startLine": 3,
"startColumn": 1,
"endLine": 3,
"endColumn": 12,
"start": 103,
"end": 114
}
},
"directives": [],
"children": [
{
"type": "Element",
"name": "button",
"namespace": "http://www.w3.org/1999/xhtml",
"location": {
"startLine": 2,
"startColumn": 5,
"endLine": 2,
"endColumn": 92,
"start": 15,
"end": 102,
"startTag": {
"startLine": 2,
"startColumn": 5,
"endLine": 2,
"endColumn": 83,
"start": 15,
"end": 93
},
"endTag": {
"startLine": 2,
"startColumn": 83,
"endLine": 2,
"endColumn": 92,
"start": 93,
"end": 102
}
},
"attributes": [],
"properties": [],
"directives": [],
"listeners": [
{
"type": "EventListener",
"name": "click",
"handler": {
"type": "Identifier",
"start": 1,
"end": 8,
"name": "onClick",
"location": {
"startLine": 2,
"startColumn": 13,
"endLine": 2,
"endColumn": 30,
"start": 23,
"end": 40
}
},
"location": {
"startLine": 2,
"startColumn": 13,
"endLine": 2,
"endColumn": 30,
"start": 23,
"end": 40
}
},
{
"type": "EventListener",
"name": "touchstart",
"handler": {
"type": "Identifier",
"start": 1,
"end": 13,
"name": "onTouchStart",
"location": {
"startLine": 2,
"startColumn": 31,
"endLine": 2,
"endColumn": 58,
"start": 41,
"end": 68
}
},
"location": {
"startLine": 2,
"startColumn": 31,
"endLine": 2,
"endColumn": 58,
"start": 41,
"end": 68
}
},
{
"type": "EventListener",
"name": "touchend",
"handler": {
"type": "Identifier",
"start": 1,
"end": 11,
"name": "onTouchEnd",
"location": {
"startLine": 2,
"startColumn": 59,
"endLine": 2,
"endColumn": 82,
"start": 69,
"end": 92
}
},
"location": {
"startLine": 2,
"startColumn": 59,
"endLine": 2,
"endColumn": 82,
"start": 69,
"end": 92
}
}
],
"children": []
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"enableStaticContentOptimization": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import _implicitStylesheets from "./multiple-non-static-optimized.css";
import _implicitScopedStylesheets from "./multiple-non-static-optimized.scoped.css?scoped=true";
import { freezeTemplate, registerTemplate } from "lwc";
function tmpl($api, $cmp, $slotset, $ctx) {
const { b: api_bind, h: api_element } = $api;
const { _m0 } = $ctx;
return [
api_element("button", {
key: 0,
on:
_m0 ||
($ctx._m0 = {
click: api_bind($cmp.onClick),
touchstart: api_bind($cmp.onTouchStart),
touchend: api_bind($cmp.onTouchEnd),
}),
}),
];
/*LWC compiler vX.X.X*/
}
export default registerTemplate(tmpl);
tmpl.stylesheets = [];
tmpl.stylesheetToken = "lwc-3c8br5010o7";
tmpl.legacyStylesheetToken =
"x-multiple-non-static-optimized_multiple-non-static-optimized";
if (_implicitStylesheets) {
tmpl.stylesheets.push.apply(tmpl.stylesheets, _implicitStylesheets);
}
if (_implicitScopedStylesheets) {
tmpl.stylesheets.push.apply(tmpl.stylesheets, _implicitScopedStylesheets);
}
freezeTemplate(tmpl);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"warnings": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<button onclick={onClick} ontouchstart={onTouchStart} ontouchend={onTouchEnd}></button>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
{
"root": {
"type": "Root",
"location": {
"startLine": 1,
"startColumn": 1,
"endLine": 3,
"endColumn": 12,
"start": 0,
"end": 114,
"startTag": {
"startLine": 1,
"startColumn": 1,
"endLine": 1,
"endColumn": 11,
"start": 0,
"end": 10
},
"endTag": {
"startLine": 3,
"startColumn": 1,
"endLine": 3,
"endColumn": 12,
"start": 103,
"end": 114
}
},
"directives": [],
"children": [
{
"type": "Element",
"name": "button",
"namespace": "http://www.w3.org/1999/xhtml",
"location": {
"startLine": 2,
"startColumn": 5,
"endLine": 2,
"endColumn": 92,
"start": 15,
"end": 102,
"startTag": {
"startLine": 2,
"startColumn": 5,
"endLine": 2,
"endColumn": 83,
"start": 15,
"end": 93
},
"endTag": {
"startLine": 2,
"startColumn": 83,
"endLine": 2,
"endColumn": 92,
"start": 93,
"end": 102
}
},
"attributes": [],
"properties": [],
"directives": [],
"listeners": [
{
"type": "EventListener",
"name": "click",
"handler": {
"type": "Identifier",
"start": 1,
"end": 8,
"name": "onClick",
"location": {
"startLine": 2,
"startColumn": 13,
"endLine": 2,
"endColumn": 30,
"start": 23,
"end": 40
}
},
"location": {
"startLine": 2,
"startColumn": 13,
"endLine": 2,
"endColumn": 30,
"start": 23,
"end": 40
}
},
{
"type": "EventListener",
"name": "touchstart",
"handler": {
"type": "Identifier",
"start": 1,
"end": 13,
"name": "onTouchStart",
"location": {
"startLine": 2,
"startColumn": 31,
"endLine": 2,
"endColumn": 58,
"start": 41,
"end": 68
}
},
"location": {
"startLine": 2,
"startColumn": 31,
"endLine": 2,
"endColumn": 58,
"start": 41,
"end": 68
}
},
{
"type": "EventListener",
"name": "touchend",
"handler": {
"type": "Identifier",
"start": 1,
"end": 11,
"name": "onTouchEnd",
"location": {
"startLine": 2,
"startColumn": 59,
"endLine": 2,
"endColumn": 82,
"start": 69,
"end": 92
}
},
"location": {
"startLine": 2,
"startColumn": 59,
"endLine": 2,
"endColumn": 82,
"start": 69,
"end": 92
}
}
],
"children": []
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"enableStaticContentOptimization": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import _implicitStylesheets from "./multiple-static-optimized.css";
import _implicitScopedStylesheets from "./multiple-static-optimized.scoped.css?scoped=true";
import { freezeTemplate, parseFragment, registerTemplate } from "lwc";
const $fragment1 = parseFragment`<button${3}></button>`;
function tmpl($api, $cmp, $slotset, $ctx) {
const { b: api_bind, sp: api_static_part, st: api_static_fragment } = $api;
const { _m0, _m1 } = $ctx;
return [
api_static_fragment($fragment1, 1, [
api_static_part(
0,
{
on:
_m1 ||
($ctx._m1 = {
click: api_bind($cmp.onClick),
touchstart: api_bind($cmp.onTouchStart),
touchend: api_bind($cmp.onTouchEnd),
}),
},
null
),
]),
];
/*LWC compiler vX.X.X*/
}
export default registerTemplate(tmpl);
tmpl.stylesheets = [];
tmpl.stylesheetToken = "lwc-7ppqi31636p";
tmpl.legacyStylesheetToken =
"x-multiple-static-optimized_multiple-static-optimized";
if (_implicitStylesheets) {
tmpl.stylesheets.push.apply(tmpl.stylesheets, _implicitStylesheets);
}
if (_implicitScopedStylesheets) {
tmpl.stylesheets.push.apply(tmpl.stylesheets, _implicitScopedStylesheets);
}
freezeTemplate(tmpl);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"warnings": []
}

0 comments on commit 49c0252

Please sign in to comment.