From 8b51e818a3e728f274ca600de7b9751e650cb6ba Mon Sep 17 00:00:00 2001 From: Patrick Steele-Idem Date: Mon, 1 Feb 2016 16:34:16 -0700 Subject: [PATCH] Marko v3: Improved assertions --- compiler/Compiler.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/Compiler.js b/compiler/Compiler.js index 1af6d799c..5fe75750c 100644 --- a/compiler/Compiler.js +++ b/compiler/Compiler.js @@ -71,8 +71,9 @@ class Compiler { } compile(src, filename) { - ok(src); - ok(filename); + ok(typeof src === 'string', '"src" argument should be a string'); + ok(filename, '"filename" argument is required'); + ok(typeof filename === 'string', '"filename" argument should be a string'); var context = new CompileContext(src, filename, this.builder);