mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
* Fix #4725: apply transpile option to require’d .coffee files * Use the current module’s options if it has any, before going searching up the tree * Don’t mutate passed-in options object
This commit is contained in:
@@ -166,3 +166,7 @@ test "using transpile from the Node API requires an object", ->
|
||||
CoffeeScript.compile '', transpile: yes
|
||||
catch exception
|
||||
eq exception.message, 'The transpile option must be given an object with options to pass to Babel'
|
||||
|
||||
test "transpile option applies to imported .coffee files", ->
|
||||
return if global.testingBrowser
|
||||
doesNotThrow -> transpile 'run', "import { getSep } from './test/importing/transpile_import'\ngetSep()"
|
||||
|
||||
3
test/importing/transpile_import.coffee
Normal file
3
test/importing/transpile_import.coffee
Normal file
@@ -0,0 +1,3 @@
|
||||
import path from 'path'
|
||||
|
||||
export getSep = -> path.sep
|
||||
Reference in New Issue
Block a user