Skip to content

Commit

Permalink
test: update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed May 15, 2024
1 parent e75dbfc commit 11b0da4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default defineConfig({
},
},
plugins: [
// @ts-expect-error: Pinned Vite version inconsistency
UnoCSS(),
],
})
4 changes: 2 additions & 2 deletions test/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ exports[`builds panel plugins 1`] = `
`;

exports[`compiles vue templates 1`] = `
"(function(){"use strict";function l(o,n,p,m,i,r,a,C){var e=typeof o=="function"?o.options:o;n&&(e.render=n,e.staticRenderFns=p,e._compiled=!0),m&&(e.functional=!0),r&&(e._scopeId="data-v-"+r);var s;if(a?(s=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!t&&typeof __VUE_SSR_CONTEXT__<"u"&&(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},e._ssrRegister=s):i&&(s=C?function(){i.call(this,(e.functional?this.parent:this).$root.$options.shadowRoot)}:i),s)if(e.functional){e._injectStyles=s;var R=e.render;e.render=function($,f){return s.call(f),R($,f)}}else{var _=e.beforeCreate;e.beforeCreate=_?[].concat(_,s):[s]}return{exports:o,options:e}}const c={created(){console.log("created")}};var d=function(){var n=this;return n._self._c,n._m(0)},u=[function(){var o=this,n=o._self._c;return n("section",{staticClass:"k-demo-section"},[n("header",{staticClass:"k-section-header"},[n("h2",{staticClass:"k-headline"},[o._v("Custom section")])])])}],h=l(c,d,u,!1,null,null,null,null);const v=h.exports;window.panel.plugin("kirbyup/test",{sections:{demo:v}})})();
"(function(){"use strict";function o(n,e,_,d,l,u,f,m){var t=typeof n=="function"?n.options:n;return e&&(t.render=e,t.staticRenderFns=_,t._compiled=!0),{exports:n,options:t}}const s={created(){console.log("created")}};var i=function(){var e=this;return e._self._c,e._m(0)},c=[function(){var n=this,e=n._self._c;return e("section",{staticClass:"k-demo-section"},[e("header",{staticClass:"k-section-header"},[e("h2",{staticClass:"k-headline"},[n._v("Custom section")])])])}],a=o(s,i,c);const r=a.exports;window.panel.plugin("kirbyup/test",{sections:{demo:r}})})();
"
`;

exports[`supports auto-importing components 1`] = `
"(function(){"use strict";function l(n,o,t,i,s,a,f,S){var e=typeof n=="function"?n.options:n;o&&(e.render=o,e.staticRenderFns=t,e._compiled=!0),i&&(e.functional=!0),a&&(e._scopeId="data-v-"+a);var _;if(f?(_=function(r){r=r||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!r&&typeof __VUE_SSR_CONTEXT__<"u"&&(r=__VUE_SSR_CONTEXT__),s&&s.call(this,r),r&&r._registeredComponents&&r._registeredComponents.add(f)},e._ssrRegister=_):s&&(_=S?function(){s.call(this,(e.functional?this.parent:this).$root.$options.shadowRoot)}:s),_)if(e.functional){e._injectStyles=_;var T=e.render;e.render=function(j,c){return _.call(c),T(j,c)}}else{var u=e.beforeCreate;e.beforeCreate=u?[].concat(u,_):[_]}return{exports:n,options:e}}const d={};var v=function(){var o=this,t=o._self._c;return t("k-header",[o._v("Bar")])},p=[],m=l(d,v,p,!1,null,null,null,null);const b=m.exports,h=Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"})),g={};var C=function(){var o=this,t=o._self._c;return t("k-header",[o._v("Foo")])},O=[],$=l(g,C,O,!1,null,null,null,null);const k=$.exports,R=Object.freeze(Object.defineProperty({__proto__:null,default:k},Symbol.toStringTag,{value:"Module"})),y=Object.freeze({import(n){return Object.entries(n).reduce((t,[i,s])=>(t[F(i)]=s.default,t),{})}});function F(n){return n.substring(n.lastIndexOf("/")+1,n.lastIndexOf(".")).toLowerCase()}window.panel.plugin("kirbyup/example",{blocks:y.import(Object.assign({"./components/blocks/Bar.vue":h,"./components/blocks/Foo.vue":R}))})})();
"(function(){"use strict";function r(e,n,o,_,s,y,k,F){var t=typeof e=="function"?e.options:e;return n&&(t.render=n,t.staticRenderFns=o,t._compiled=!0),{exports:e,options:t}}const c={};var i=function(){var n=this,o=n._self._c;return o("k-header",[n._v("Bar")])},a=[],l=r(c,i,a);const u=l.exports,d=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"})),f={};var m=function(){var n=this,o=n._self._c;return o("k-header",[n._v("Foo")])},p=[],v=r(f,m,p);const b=v.exports,g=Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"})),O=Object.freeze({import(e){return Object.entries(e).reduce((o,[_,s])=>(o[j(_)]=s.default,o),{})}});function j(e){return e.substring(e.lastIndexOf("/")+1,e.lastIndexOf(".")).toLowerCase()}window.panel.plugin("kirbyup/example",{blocks:O.import(Object.assign({"./components/blocks/Bar.vue":d,"./components/blocks/Foo.vue":g}))})})();
"
`;

Expand Down

0 comments on commit 11b0da4

Please sign in to comment.