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

fails running symlink test files #1137

Closed
wants to merge 1 commit into from

Conversation

mastilver
Copy link

I tried solving my issue: #1136
I tried to use symlink instead but it's throwing:

(function (exports, require, module, __filename, __dirname) { import test from 'ava';
                                                              ^^^^^^
SyntaxError: Unexpected token import
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    at Module._extensions..js (module.js:579:10)
    at extensions.(anonymous function) (/home/thomas/Code/nosqwal/packages/nosqwal-memory/node_modules/require-precompiled/index.js:16:3)
    at Object.require.extensions.(anonymous function) [as .js] (/home/thomas/Code/nosqwal/packages/nosqwal-memory/node_modules/ava/lib/test-worker.js:91:3)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/thomas/Code/nosqwal/packages/nosqwal-memory/node_modules/ava/lib/test-worker.js:95:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

@novemberborn
Copy link
Member

Could you provide more detail? Perhaps we don't resolve symlinks in test patterns but that doesn't explain the syntax error.

@mastilver
Copy link
Author

Here's my package.json when using symlink: https://github.com/mastilver/nosqwal/blob/6a5ceaf53ddcc2c1c7747e7f2910def72a4d7963/packages/nosqwal-memory/package.json
and the failing build: https://travis-ci.org/mastilver/nosqwal/builds/180356647

So I've got: ln -s node_modules/nosqwal-test/test ./ as a postinstall script
I have the default ava config, so I would assume ava to run test inside the test folder

@novemberborn
Copy link
Member

@mastilver I've managed to reproduce this issue, see #1143 for details.

Closing this PR since we don't have a good way of accepting failing tests for AVA itself. Nice find though!

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.

2 participants