Reorganize things and remove unneeded dependency on jQuery
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
jQuery(function($) {
|
||||
|
||||
module("basic context");
|
||||
|
||||
test("compiling with a basic context", function() {
|
||||
var string = "Goodbye\n{{cruel}}\n{{world}}";
|
||||
var template = Handlebars.compile(string);
|
||||
|
||||
result = template({cruel: "cruel", world: "world"});
|
||||
equal("Goodbye\ncruel\nworld", result, "it works if all the required keys are provided");
|
||||
});
|
||||
|
||||
test("comments", function() {
|
||||
var string = "{{! Goodbye}}Goodbye\n{{cruel}}\n{{world}}";
|
||||
var template = Handlebars.compile(string);
|
||||
|
||||
result = template({cruel: "cruel", world: "world"});
|
||||
equal("Goodbye\ncruel\nworld", result, "it works if all the required keys are provided");
|
||||
});
|
||||
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
module("basic context");
|
||||
|
||||
test("compiling with a basic context", function() {
|
||||
var string = "Goodbye\n{{cruel}}\n{{world}}";
|
||||
var template = Handlebars.compile(string);
|
||||
|
||||
result = template({cruel: "cruel", world: "world"});
|
||||
equal("Goodbye\ncruel\nworld", result, "it works if all the required keys are provided");
|
||||
});
|
||||
|
||||
test("comments", function() {
|
||||
var string = "{{! Goodbye}}Goodbye\n{{cruel}}\n{{world}}";
|
||||
var template = Handlebars.compile(string);
|
||||
|
||||
result = template({cruel: "cruel", world: "world"});
|
||||
equal("Goodbye\ncruel\nworld", result, "it works if all the required keys are provided");
|
||||
});
|
||||
@@ -2,11 +2,10 @@
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<script src="../vendor/jquery.js"></script>
|
||||
<link rel="stylesheet" href="../vendor/test/qunit.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript" src="../vendor/test/qunit.js"></script>
|
||||
<script type="text/javascript" src="../handlebars.js"></script>
|
||||
<script type="text/javascript" src="handlebars.js"></script>
|
||||
<script src="vendor/jquery.js"></script>
|
||||
<link rel="stylesheet" href="vendor/test/qunit.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript" src="vendor/test/qunit.js"></script>
|
||||
<script type="text/javascript" src="../lib/handlebars.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="qunit-header">QUnit example</h1>
|
||||
@@ -15,6 +14,7 @@
|
||||
<ol id="qunit-tests"></ol>
|
||||
<div id="main" style="display: none">
|
||||
</div>
|
||||
<script type="text/javascript" src="handlebars.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user