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

WIP: use dynamic import to load es module tests. #3253

Closed
wants to merge 8 commits into from

Commits on Feb 26, 2018

  1. Adds flag --es-modules to dynamically import test files.

    When the --es-modules flag is provided import() will be used to load
    all test files.
    harrysarson committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    d46d557 View commit details
    Browse the repository at this point in the history
  2. Add .js extension to bin/_mocha to get tests passing

    node 9.6 will not allow script files without .js extensions when --experimental-modules
    flag is passed. I think node 9.7 will allow this so this commit can be reverted then.
    harrysarson committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    a7d5262 View commit details
    Browse the repository at this point in the history
  3. Only test node v9 and don't check coverage.

    Node versions less than 9.6 do not support dynamic es imports. Currently
    using instanbul to calculate codecoverage calls some script without a .js file extension
    which causes the tests to fail. Hopefully in v9.7 this will be
    fixed.
    harrysarson committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    10736aa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b28d2db View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2018

  1. Test that cjs tests still work when using es-modules.

    Adds an integration test that uses cjs modules but is called with
    the --es-modules flag.
    harrysarson committed Feb 27, 2018
    Configuration menu
    Copy the full SHA
    e1ad789 View commit details
    Browse the repository at this point in the history
  2. Catch and report errors thrown from top level of modules.

    Dynamic imports are async and therefore errors need to be explicitly handled.
    harrysarson committed Feb 27, 2018
    Configuration menu
    Copy the full SHA
    a16f8d0 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2018

  1. Revert "Only test node v9 and don't check coverage."

    This reverts commit 10736aa.
    harrysarson committed Mar 7, 2018
    Configuration menu
    Copy the full SHA
    a494924 View commit details
    Browse the repository at this point in the history
  2. Revert "Try running tests on appveyer with node v9"

    This reverts commit b28d2db.
    harrysarson committed Mar 7, 2018
    Configuration menu
    Copy the full SHA
    666a25f View commit details
    Browse the repository at this point in the history