mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
* Update CoffeeScript to 1.11.0, which supports modules; update check for whether to pass CoffeeScript’s output to Babel to look not just for backticks, but also for `import`, `export` and `function*`, the current ESNext features output by CoffeeScript * Add tests for imported modules using CoffeeScript’s new native import statement * Test that CoffeeScript native export statements work, by importing something exported by such a statement * Improve regex * Optimize regex
31 lines
1.4 KiB
CoffeeScript
31 lines
1.4 KiB
CoffeeScript
Meteor.__COFFEESCRIPT_PRESENT = true
|
|
|
|
# This is read in coffeescript_strict_tests.coffee.
|
|
share.coffeeShared = 789
|
|
|
|
Tinytest.add "coffeescript - compile", (test) -> test.isTrue true
|
|
|
|
|
|
# import/export statements must be top-level
|
|
`import { Meteor as testingForBacktickedImportedSymbol } from "meteor/meteor";`
|
|
Tinytest.add "coffeescript - import external package via backticked import statement", (test) ->
|
|
test.isTrue testingForBacktickedImportedSymbol?
|
|
|
|
`import { testingForImportedModule987654321 } from "./es2015_module.js";`
|
|
Tinytest.add "coffeescript - import local module via backticked import statement", (test) ->
|
|
test.isTrue testingForImportedModule987654321?
|
|
|
|
|
|
import { Meteor as testingForNativeImportedSymbol } from "meteor/meteor"
|
|
Tinytest.add "coffeescript - import external package via native import statement", (test) ->
|
|
test.isTrue testingForNativeImportedSymbol?
|
|
|
|
import { testingForImportedModule123456789 } from "./es2015_module.js";
|
|
Tinytest.add "coffeescript - import local module via native import statement", (test) ->
|
|
test.isTrue testingForImportedModule123456789?
|
|
|
|
|
|
import { testingForNativeImportedModule123456789 } from "./coffeescript_module.coffee";
|
|
Tinytest.add "coffeescript - import local module exported by a CoffeeScript native export statement, via native import statement", (test) ->
|
|
test.isTrue testingForNativeImportedModule123456789?
|