Adding tests for Literal nodes

This commit is contained in:
Jeff Avallone
2014-12-19 21:35:03 -05:00
parent 94ff093824
commit 32a28ede90
2 changed files with 81 additions and 5 deletions
+4 -5
View File
@@ -4,8 +4,8 @@ export default {
type: 'literal',
_render() {
return this.renderLabel(['"', this.literal.textValue, '"'])
.then(label => {
return this.renderLabel(['"', this.literal, '"'])
.tap(label => {
var spans = label.selectAll('tspan');
spans[0].addClass('quote');
@@ -19,11 +19,10 @@ export default {
},
merge(other) {
this.textValue += other.textValue;
this.literal.textValue += other.literal.textValue;
this.literal += other.literal;
},
setup() {
this.literal = this.properties.literal;
this.literal = this.properties.literal.textValue;
}
};