Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[test] Fixed copy paste description of test 30 and included this test…

… in browser.html
  • Loading branch information...
commit 2a7949592aed77c1ac41147ced605ba87c6c93be 1 parent 5f9edd2
@danhumphrey danhumphrey authored
Showing with 25 additions and 1 deletion.
  1. +1 −1  test/api-test.js
  2. +24 −0 test/browser.html
View
2  test/api-test.js
@@ -316,7 +316,7 @@ vows.describe('merge data into markup').addBatch({
}()
),
- '(30) a tag match without attributes should replace the contents': (
+ '(30) use can be passed a function which returns the value': (
function() {
var map = Plates.Map();
View
24 test/browser.html
@@ -484,6 +484,20 @@ <h3 class="name">FooBar</h3>
<div id="key1" style="visible: foobar > 1">value1</div>
</script>
+
+<script type="test/fixture" id="test-30.json">
+{ "uppercase": "UPPERCASED" }
+
+</script>
+<script type="test/fixture" id="test-30.html">
+<div class="transformation"></div>
+
+</script>
+<script type="test/fixture" id="test-30.out">
+<div class="transformation">uppercased</div>
+
+</script>
+
<script type="test/fixture" id="test-4.html">
<a id="someid" src="google.com"></a>
<a id="someotherid" src="yahoo.com"></a>
@@ -806,4 +820,14 @@ <h3 class="name">FooBar</h3>
return common.createTest('test-29', map);
});
+
+test("(30) use can be passed a function which returns the value", function() {
+ var map = Plates.Map();
+ map.class('transformation').use(function (data, key) {
+ return data.uppercase.toLowerCase();
+ });
+
+ return common.createTest('test-30', map);
+});
+
</script>
Please sign in to comment.
Something went wrong with that request. Please try again.