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

Doesn't seem work with coffeescript #521

Closed
adius opened this issue Feb 7, 2016 · 5 comments
Closed

Doesn't seem work with coffeescript #521

adius opened this issue Feb 7, 2016 · 5 comments

Comments

@adius
Copy link

adius commented Feb 7, 2016

I have following lines in my package file:

  "scripts": {
    "test": "ava --require coffee-script/register --verbose test"
  },
  "devDependencies": {
    "ava": "^0.11.0",
    "coffee-script": "^1.10.0"
  }

The test directory contains a main.coffee file with ava tests.

When I run npm test, however, it always says Couldn't find any files to test.

Any ideas?

@novemberborn
Copy link
Member

@adius currently test files must be JavaScript files, ending in .js. Are you trying to use a test file written in Coffeescript?

@SamVerschueren
Copy link
Contributor

You could compile it first to JavaScript and then run that file. Just like with TypeScript. Although it might be cleaner if AVA could handle .coffee files directly.

@Whoaa512
Copy link

I haven't tried this, but couldn't you change the search pattern for files to include test/**/*.coffee either in AVA config in package.json or directly in your test command? Assuming you retain the --require coffee-script/register

@jamestalmage
Copy link
Contributor

couldn't you change the search pattern for files to include test/*/.coffee

Unfortunately, no. We are discussing a similar issue for jsx here.

@novemberborn
Copy link
Member

Closing in favor of #229.

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

No branches or pull requests

5 participants