Working Skelleton

This commit is contained in:
2019-03-11 17:03:55 +01:00
commit 8ed2de006d
6779 changed files with 514323 additions and 0 deletions
@@ -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
View File
@@ -0,0 +1,4 @@
extends ./layout-with-duplicate-block.pug
block content
div Hello World
+14
View File
@@ -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();
});
@@ -0,0 +1,8 @@
if ajax
block content
else
doctype html
html
head
body
block content