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

Make module-alias work in cli mode #76

Merged
merged 2 commits into from
Oct 1, 2019
Merged

Commits on Sep 30, 2019

  1. fix crash when using from cli

    require.main is undefined when running from cli - don't use unless it exists
    dgobaud authored and Kehrlann committed Sep 30, 2019
    Configuration menu
    Copy the full SHA
    2223dc0 View commit details
    Browse the repository at this point in the history
  2. Add tests for REPL mode

    - This require introducing a way of having "require.main" undefined
      in our module. The require function is different between the test
      module and the module under test, so we can't just do
      `require.main = null`
      in the test function, as it won't affect the "require" function
      of the prod code. So we need to introduce a helper function for
      evaluating require.main, and injact a flag in the test module
      when running the tests.
    Kehrlann committed Sep 30, 2019
    Configuration menu
    Copy the full SHA
    b377450 View commit details
    Browse the repository at this point in the history