FIX: Don't generate compatibility layer for test files

This commit is contained in:
Robin Ward 2014-08-06 18:07:27 -04:00
parent f977843391
commit c709ea8f9e
1 changed files with 4 additions and 1 deletions

View File

@ -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