Marko v3: Improved assertions

This commit is contained in:
Patrick Steele-Idem 2016-02-01 16:34:16 -07:00
parent bd65a6566a
commit 8b51e818a3

View File

@ -71,8 +71,9 @@ class Compiler {
} }
compile(src, filename) { compile(src, filename) {
ok(src); ok(typeof src === 'string', '"src" argument should be a string');
ok(filename); ok(filename, '"filename" argument is required');
ok(typeof filename === 'string', '"filename" argument should be a string');
var context = new CompileContext(src, filename, this.builder); var context = new CompileContext(src, filename, this.builder);