diff options
author | kpdecker <kpdecker@gmail.com> | 2013-06-01 23:45:43 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2013-06-01 23:45:43 -0500 |
commit | adda0569e0ec3fc363af9efbb23f5304c6d80fe2 (patch) | |
tree | 9952d7aed77f8710a53731bb98340d5468c9e931 /spec/tokenizer.js | |
parent | d13ae310d36a27fcbc333570f9b7ae9c7e641392 (diff) | |
download | handlebars.js-adda0569e0ec3fc363af9efbb23f5304c6d80fe2.zip handlebars.js-adda0569e0ec3fc363af9efbb23f5304c6d80fe2.tar.gz handlebars.js-adda0569e0ec3fc363af9efbb23f5304c6d80fe2.tar.bz2 |
Refactor qunit unit tests
Allows for testing node, browser, and precompiled modes in the node
tests. Also reorganizes the qunit spec file to provide better
organization.
Diffstat (limited to 'spec/tokenizer.js')
-rw-r--r-- | spec/tokenizer.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/tokenizer.js b/spec/tokenizer.js index c69f406..f86774a 100644 --- a/spec/tokenizer.js +++ b/spec/tokenizer.js @@ -1,5 +1,4 @@ -var Handlebars = require('../lib/handlebars'), - should = require('should'); +var should = require('should'); should.Assertion.prototype.match_tokens = function(tokens) { this.obj.forEach(function(value, index) { @@ -11,6 +10,10 @@ should.Assertion.prototype.be_token = function(name, text) { }; describe('Tokenizer', function() { + if (!Handlebars.Parser) { + return; + } + function tokenize(template) { var parser = Handlebars.Parser, lexer = parser.lexer; |