Skip to content

Cannot generate test for export default functions and classes #2501

Open
@tyuldashev

Description

@tyuldashev

Description
If function or class marked as export default then UTBot doesn't suggest to generate test for such objects.

To Reproduce

  1. Install UnitTestBot plugin built from main in IntelliJ IDEA
  2. Open some JavaScript project
  3. Try to invoke Test Generation dialog for following code:
export default function cube(x) {
  return x * x * x;
}

Expected behavior
Dialog appears.

Actual behavior
When pressing hotkey, nothing happens. File context menu is disabled.

Screenshots, logs

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp-ideIssue is related to IDE supportctg-bugIssue is a buglang-javascriptIssue is related to JavaScript support

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions