So siehts ganz gut aus !
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
exports[`test layout with shadowed block 1`] = `"<!-- layout.pug: root--><!-- index.pug: shadowed-->"`;
|
||||
|
||||
exports[`test layout with shadowed block 2`] = `"<!-- layout.pug: root--><!-- index.pug: shadowed-->"`;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
block root
|
||||
// base.pug: root
|
||||
block shadowed
|
||||
// base.pug: shadowed
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
extends ./layout.pug
|
||||
|
||||
block shadowed
|
||||
// index.pug: shadowed
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
const pug = require('../../');
|
||||
|
||||
test('layout with shadowed block', () => {
|
||||
const outputWithAjax = pug.renderFile(
|
||||
__dirname + '/index.pug',
|
||||
{ajax: true}
|
||||
);
|
||||
const outputWithoutAjax = pug.renderFile(
|
||||
__dirname + '/index.pug',
|
||||
{ajax: false}
|
||||
);
|
||||
expect(outputWithAjax).toMatchSnapshot();
|
||||
expect(outputWithoutAjax).toMatchSnapshot();
|
||||
});
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
extends ./base.pug
|
||||
|
||||
block root
|
||||
// layout.pug: root
|
||||
block shadowed
|
||||
// layout.pug: shadowed
|
||||
Reference in New Issue
Block a user