initial
This commit is contained in:
3
node_modules/pug/test/duplicate-block/__snapshots__/index.test.js.snap
generated
vendored
Normal file
3
node_modules/pug/test/duplicate-block/__snapshots__/index.test.js.snap
generated
vendored
Normal file
@@ -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
node_modules/pug/test/duplicate-block/index.pug
generated
vendored
Normal file
4
node_modules/pug/test/duplicate-block/index.pug
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
extends ./layout-with-duplicate-block.pug
|
||||
|
||||
block content
|
||||
div Hello World
|
||||
14
node_modules/pug/test/duplicate-block/index.test.js
generated
vendored
Normal file
14
node_modules/pug/test/duplicate-block/index.test.js
generated
vendored
Normal 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();
|
||||
});
|
||||
8
node_modules/pug/test/duplicate-block/layout-with-duplicate-block.pug
generated
vendored
Normal file
8
node_modules/pug/test/duplicate-block/layout-with-duplicate-block.pug
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
if ajax
|
||||
block content
|
||||
else
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
body
|
||||
block content
|
||||
Reference in New Issue
Block a user