diff --git a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb index 23aeac8cddf..39d377b4a12 100644 --- a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb +++ b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb @@ -80,7 +80,10 @@ module Tilt class_name << "s" end require_name = module_name(scope.root_path, scope.logical_path) - @output << "\n\nDiscourse.#{class_name}#{type.classify} = require('#{require_name}').default" + + if require_name !~ /\-test$/ + @output << "\n\nDiscourse.#{class_name}#{type.classify} = require('#{require_name}').default;\n" + end end # Include JS code for JSHint