So siehts ganz gut aus !
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
exports[`test layout with duplicate block 1`] = `"<div>Hello World</div>"`;
|
||||
|
||||
exports[`test layout with duplicate block 2`] = `"<!DOCTYPE html><html><head></head><body><div>Hello World</div></body></html>"`;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
extends ./layout-with-duplicate-block.pug
|
||||
|
||||
block content
|
||||
div Hello World
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
const pug = require('../../');
|
||||
|
||||
test('layout with duplicate 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();
|
||||
});
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
if ajax
|
||||
block content
|
||||
else
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
body
|
||||
block content
|
||||
Reference in New Issue
Block a user