-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df7d661
commit 65e445e
Showing
8 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
packages/pug/test/regression-2436/__snapshots__/index.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
exports[`test #2436 - block with a same name extends from different layout in nesting 1`] = ` | ||
" | ||
<h1>layout </h1> | ||
<p>Other A</p> | ||
<h1>other layout</h1> | ||
<p>Other A</p>" | ||
`; | ||
|
||
exports[`test #2436 - block with a same name extends from the same layout in nesting 1`] = ` | ||
" | ||
<h1>layout </h1> | ||
<p>Other A</p> | ||
<h1>layout </h1> | ||
<p>Other A</p>" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const pug = require('../../'); | ||
|
||
test('#2436 - block with a same name extends from the same layout in nesting', () => { | ||
const output = pug.renderFile( | ||
__dirname + '/issue1.pug', | ||
{pretty: true} | ||
); | ||
expect(output).toMatchSnapshot(); | ||
}); | ||
|
||
test('#2436 - block with a same name extends from different layout in nesting', () => { | ||
const output = pug.renderFile( | ||
__dirname + '/issue2.pug', | ||
{pretty: true} | ||
); | ||
expect(output).toMatchSnapshot(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends layout.pug | ||
|
||
block a | ||
p Main A | ||
|
||
block b | ||
include other1.pug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends layout.pug | ||
|
||
block a | ||
p Main A | ||
|
||
block b | ||
include other2.pug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
h1 layout | ||
|
||
block a | ||
p block in layout | ||
|
||
block b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extends layout.pug | ||
|
||
block a | ||
p Other A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extends other_layout.pug | ||
|
||
block a | ||
p Other A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
h1 other layout | ||
|
||
block a | ||
p block in other layout |