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

Add a globals option to configure automatically installed globals #1139

Open
jason0x43 opened this issue Apr 14, 2020 · 1 comment
Open

Add a globals option to configure automatically installed globals #1139

jason0x43 opened this issue Apr 14, 2020 · 1 comment
Labels
effort-medium This may take a couple of days enhancement A new or improved feature needs-opinions Needs opinions to decide how to handle
Projects

Comments

@jason0x43
Copy link
Member

Allow test interfaces and assertions to be added to the global namespace, making testing writing simpler.

By default, the only thing added to the global space should be the existing intern object.

A globals config option should allow the user to specify one of the built-in interfaces and/or one of the built-in assertion modules to be added to the global namespace.

{
  "globals": {
    "interface": "bdd",
    "assertions": "expect"
  }
}

To support typing, .d.ts files should be added to a globals directory in the intern package that declare these globals. A tsconfig could then include relevant ones:

{
  "files": [
    "node_modules/intern/globals/bdd.d.ts"
  ]
}
@jason0x43 jason0x43 added enhancement A new or improved feature effort-medium This may take a couple of days priority-high Most important labels Apr 14, 2020
@jason0x43 jason0x43 added this to To do in Intern 5 via automation Apr 14, 2020
@github-actions github-actions bot added this to To do in Development Apr 14, 2020
@github-actions github-actions bot moved this from To do to In progress in Intern 5 Apr 14, 2020
@jason0x43 jason0x43 removed the priority-high Most important label Apr 14, 2020
@jason0x43 jason0x43 moved this from In progress to To do in Intern 5 Apr 14, 2020
@jason0x43 jason0x43 removed this from To do in Intern 5 Apr 14, 2020
@jason0x43 jason0x43 moved this from To do to Triage in Development Apr 14, 2020
@jason0x43 jason0x43 removed this from Triage in Development Apr 14, 2020
@jason0x43 jason0x43 added the needs-opinions Needs opinions to decide how to handle label Apr 14, 2020
@jason0x43
Copy link
Member Author

Let's see how well the simplified imports (#1120) work before adding globals.

@github-actions github-actions bot added this to To do in Development Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort-medium This may take a couple of days enhancement A new or improved feature needs-opinions Needs opinions to decide how to handle
Projects
Development

No branches or pull requests

1 participant