fix(parser): handle empty strings

This commit is contained in:
vsavkin
2014-11-25 18:38:28 -08:00
parent 6f889e3094
commit a3d9f0fead
3 changed files with 19 additions and 2 deletions

View File

@ -150,6 +150,10 @@ export function main() {
expectEvalError("null + null").toThrowError();
expectEvalError("null - null").toThrowError();
});
it('should parse an empty string', () => {
expectEval('').toBeNull();
});
});
describe("literals", () => {
@ -376,7 +380,7 @@ export function main() {
}
it('should parse an empty string', () => {
var bindings = parseTemplateBindings("");
var bindings = parseTemplateBindings('');
expect(bindings).toEqual([]);
});