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 option "require(s)" #136

Closed
wants to merge 1 commit into from
Closed

Conversation

liuxh0
Copy link
Contributor

@liuxh0 liuxh0 commented Jul 19, 2018

As discussed in #135, add new option --require for CLI and "requires": [ ] for configuration file. A common use case is: --require=ts-node/register.

Although option helper can achieve the goal, there are two main reasons for this option:

  1. Tools like mocha and istanbul have the same option.
  2. It needs to create a separate helper js and require modules in that file.

Add option "--require" for CLI and "requires" for configuration file
to load specific module. Analog to "--helper" / "helpers", modules are
required before test. This is helpful for loading ts-node/register or
@babel/register.

Usage:
 - For CLI: jasmine --require=ts-node/register
 - For configuration file: "requires": ["ts-node/register"]
slackersoft pushed a commit that referenced this pull request Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants