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

problem with paths #45

Open
danieltigse opened this issue Aug 14, 2020 · 2 comments
Open

problem with paths #45

danieltigse opened this issue Aug 14, 2020 · 2 comments

Comments

@danieltigse
Copy link

danieltigse commented Aug 14, 2020

I am trying to use haraka-test-fixtures but I am having problems with the function sandbox_require of vm_harness. Basically it can't find my dependencies. To give you more context: I have a plugin and I do a require of another file in the same path of the plugin. When the test try to look for the file it can be found because you have declared only this paths:

const dir_paths = [
    __dirname + '/../../../',  // for Haraka/tests/plugins
    __dirname + '/',           // for haraka-test-fixtures/test
];

is there a way that the require search in the same path where my plugin is?

@Ryan-Knepp
Copy link

I just ran into this same issue too. Is there a reason why find_haraka_lib ignores the path when it can't find it in any of the dir_paths? I'm thinking having this just return id if it can't find anything would do the trick.

@msimerson
Copy link
Member

As the author of haraka-test-fixtures, I can tell you that I addressed all the known paths, at the time I wrote it. If it needs to be extended, PRs are welcome.

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

3 participants