mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
You must declare your @exports using single-line ### comments: ### @export x ### x = 5 This involves some ugly and not 100% correct low-level source hackery, making some assumptions about the format that CoffeeScript generates.
16 lines
597 B
JavaScript
16 lines
597 B
JavaScript
Tinytest.add("coffeescript - presence", function(test) {
|
|
test.isTrue(Meteor.__COFFEESCRIPT_PRESENT);
|
|
});
|
|
Tinytest.add("literate coffeescript - presence", function(test) {
|
|
test.isTrue(Meteor.__LITCOFFEESCRIPT_PRESENT);
|
|
});
|
|
|
|
Tinytest.add("coffeescript - exported variable", function(test) {
|
|
test.equal(COFFEESCRIPT_EXPORTED, 123);
|
|
test.equal(Package.coffeescript.COFFEESCRIPT_EXPORTED, 123);
|
|
});
|
|
Tinytest.add("coffeescript - exported variable with 'use strict'", function(test) {
|
|
test.equal(COFFEESCRIPT_EXPORTED2, 456);
|
|
test.equal(Package.coffeescript.COFFEESCRIPT_EXPORTED2, 456);
|
|
});
|