Skip to content

repl,test: no test coverage for repl.start({ eval: fn }) #3544

Description

@bnoordhuis

It looks like we have no test coverage for the eval option to repl.start(). This should be remedied.

The only test I can find that passes eval is test/parallel/test-repl-options.js but it doesn't exercise its functionality, the callback is just a stub.

Activity

  1. added
    replIssues and PRs related to the REPL subsystem.
    testIssues and PRs related to Node.js core tests and test infrastructure.
    on Oct 27, 2015
  2. bnoordhuis commented on Oct 27, 2015

    @bnoordhuis
    MemberAuthor

    On tab completion - eval will be called with .scope as an input string.

    I can't make this work, cmd is never '.scope'.

  3. Fishrock123 commented on Oct 27, 2015

    @Fishrock123
    Contributor

    I think it originated in aad12d0

  4. bnoordhuis commented on Oct 27, 2015

    @bnoordhuis
    MemberAuthor

    /cc @TooTallNate in that case.

  5. kapouer commented on Nov 9, 2015

    @kapouer
    Contributor

    @bnoordhuis

    var pr = repl.start({eval: ...});
    pr.context = {};
    

    eval will be called with .scope command when the user hits tab on a simple expression without dot (including an empty line).

  6. added a commit that references this issue on Feb 11, 2016
  7. Trott commented on Feb 11, 2016

    @Trott
    Member

    I've added a minimal test at #5192.

    I too am unable to get the repl to fire the eval function on tab completion. ??? Assuming I'm not just Doing It Wrong, there should probably be a separate issue filed for that.

  8. MylesBorins commented on Feb 12, 2016

    @MylesBorins
    Contributor

    @Trott thoughts on LTS?

  9. Trott commented on Feb 12, 2016

    @Trott
    Member

    I'd say yes, add to LTS.

  10. bnoordhuis commented on Feb 15, 2016

    @bnoordhuis
    MemberAuthor

    I too am unable to get the repl to fire the eval function on tab completion. ??? Assuming I'm not just Doing It Wrong, there should probably be a separate issue filed for that.

    Filed #5232 for that.

  11. added a commit that references this issue on Feb 15, 2016
  12. added a commit that references this issue on Feb 23, 2016
  13. added a commit that references this issue on Mar 2, 2016
  14. added a commit that references this issue on Jul 27, 2026
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

    replIssues and PRs related to the REPL subsystem.testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions