failing component test

pull/31/head
Rich-Harris 9 years ago
parent 0d4728faf2
commit 7adfd51649

@ -0,0 +1 @@
<p>i am a widget</p>

@ -0,0 +1,3 @@
export default {
html: '<div><p>i am a widget</p></div>'
};

@ -0,0 +1,11 @@
<div>
<Widget/>
</div>
<script>
import Widget from './Widget.html';
export default {
components: { Widget }
};
</script>

@ -8,9 +8,7 @@ import jsdom from 'jsdom';
const cache = {};
require.extensions[ '.html' ] = function ( module, filename ) {
const code = cache[ filename ];
if ( !code ) throw new Error( `not compiled: ${filename}` );
const code = cache[ filename ] || ( cache[ filename ] = compile( fs.readFileSync( filename, 'utf-8' ) ).code );
return module._compile( code, filename );
};

Loading…
Cancel
Save