Skip to content

Require failure using wallaby_server with wallaby and coffeescript #52

Description

@jdrucza

I'm trying to get wallaby working for server tests for a meteor app that uses coffeescript. So I tried to use the wallaby_server file from this repo however it fails because it can't find any meteor modules/packages. It also fails to load local modules referenced by absolute path or with the extension '.coffee'. The last is totally acceptable and the requirement for relative paths is manageable if necessary but obviously the failure to load meteor packages is a show stopper.

Sample project demonstrating the issue: https://github.com/jdrucza/coffee-wallaby

NOTE: I renamed the wallaby_server.js to '.wallaby_server.js' (i.e. starting with a '.') so it would not be picked up by meteor.

Probably obvious but for completeness/search-aid the error is:

wallaby.js started
core v1.0.259
Runtime error: Error: Cannot find module 'meteor/meteor'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (./imports/testSetup.spec.js:5:26)
....

I suspect the issue may be that wallaby needs to be configured to use meteor's coffeescript rather than its in-built version but I've no idea how to make this happen.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions