From c709ea8f9e4fcc2911c7d7a44982d93ca89934b8 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 6 Aug 2014 18:07:27 -0400 Subject: [PATCH] FIX: Don't generate compatibility layer for test files --- .../tilt/es6_module_transpiler_template.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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