-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Showing
10 changed files
with
146 additions
and
53 deletions.
There are no files selected for viewing
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
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
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
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,30 @@ | ||
import test from "ava"; | ||
import { WebC } from "../webc.js"; | ||
|
||
test("Dynamic attributes in components (attribute -> dynamic -> dynamic) #80", async t => { | ||
let component = new WebC(); | ||
|
||
component.setInputPath("./test/stubs/issue-80/page.webc"); | ||
component.defineComponents("./test/stubs/issue-80/b.webc"); | ||
component.defineComponents("./test/stubs/issue-80/c.webc"); | ||
|
||
let { html } = await component.compile(); | ||
|
||
t.is(html, `<div foo="xyz"> | ||
<img src="xyz"> | ||
</div>`); | ||
}); | ||
|
||
test("Dynamic attributes in components (dynamic -> dynamic -> dynamic) #80", async t => { | ||
let component = new WebC(); | ||
|
||
component.setInputPath("./test/stubs/issue-80-b/page.webc"); | ||
component.defineComponents("./test/stubs/issue-80-b/b.webc"); | ||
component.defineComponents("./test/stubs/issue-80-b/c.webc"); | ||
|
||
let { html } = await component.compile(); | ||
|
||
t.is(html, `<div foo="xyz"> | ||
<img src="xyz"> | ||
</div>`); | ||
}); |
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,3 @@ | ||
<div :foo="foo"> | ||
<c :foo="foo"></c> | ||
</div> |
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 @@ | ||
<img :src="foo" /> |
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 @@ | ||
<b :foo="`xyz`" /> |
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,3 @@ | ||
<div :foo="foo"> | ||
<c :foo="foo"></c> | ||
</div> |
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 @@ | ||
<img :src="foo" /> |
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 @@ | ||
<b foo="xyz" /> |