Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to require local files, -r ./local_file #241

Closed
wants to merge 5 commits into from

Conversation

quangv
Copy link

@quangv quangv commented Jan 27, 2012

-r option can already load local node_modules, it be cool if it could load local files as well.

mocha test.js -r ./utils

... gonna get it to work with coffee-script next...


currently d177952 doesn't default to .js, example

$> ls
spec.coffee
tools.js
tools.coffee

$> mocha spec.coffee -r ./tools

// Loads tools.coffee, but should load tools.js

also... might be good to add support for absolute coffee-script file modules 0ca6ca8

$> mocha spec.coffee -r /home/qv/test.coffee

Edit: .js now takes precedence over .coffee 6406472

@mcollina
Copy link

+1

@quangv
Copy link
Author

quangv commented Jan 28, 2012

Maybe I should I add some unit tests... hmm

@tj
Copy link
Contributor

tj commented Jan 28, 2012

man you coffeescript people :p you should just compile your CS to js first

@tj
Copy link
Contributor

tj commented Jan 28, 2012

I think we can do the other part of this better with the path module though I'll take a look at this later

@tj tj closed this in 4a07518 Feb 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants