mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
4
packages/coffeescript/bare_test_setup.coffee
Normal file
4
packages/coffeescript/bare_test_setup.coffee
Normal file
@@ -0,0 +1,4 @@
|
||||
# Normally, variables should be file-local, but this file is loaded with {bare:
|
||||
# true}, so it should be readable by bare_tests.js
|
||||
|
||||
VariableSetByCoffeeBareTestSetup = 5678
|
||||
3
packages/coffeescript/bare_tests.js
Normal file
3
packages/coffeescript/bare_tests.js
Normal file
@@ -0,0 +1,3 @@
|
||||
Tinytest.add("coffeescript - bare", function (test) {
|
||||
test.equal(VariableSetByCoffeeBareTestSetup, 5678);
|
||||
});
|
||||
@@ -14,6 +14,8 @@ Package._transitional_registerBuildPlugin({
|
||||
Package.on_test(function (api) {
|
||||
api.use(['coffeescript', 'tinytest']);
|
||||
api.use(['coffeescript-test-helper'], ['client', 'server']);
|
||||
api.add_files('bare_test_setup.coffee', ['client'], {bare: true});
|
||||
api.add_files('bare_tests.js', ['client']);
|
||||
api.add_files([
|
||||
'coffeescript_test_setup.js',
|
||||
'tests/coffeescript_tests.coffee',
|
||||
|
||||
@@ -149,7 +149,8 @@ var handler = function (compileStep, isLiterate) {
|
||||
path: outputFile,
|
||||
sourcePath: compileStep.inputPath,
|
||||
data: sourceWithMap.source,
|
||||
sourceMap: sourceWithMap.sourceMap
|
||||
sourceMap: sourceWithMap.sourceMap,
|
||||
bare: compileStep.fileOptions.bare
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user