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 support for preloading modules to ease adoption with other formats #84

Closed
vigneshshanmugam opened this issue Oct 12, 2020 · 0 comments · Fixed by #87
Closed

Add support for preloading modules to ease adoption with other formats #84

vigneshshanmugam opened this issue Oct 12, 2020 · 0 comments · Fixed by #87
Assignees
Labels
enhancement New feature or request

Comments

@vigneshshanmugam
Copy link
Member

  • This means we should let users to require modules before running the tests. Node.js support this out of the box with --require hook to preload modules before running the file.
  • Add -r, --require option to the CLI to add support for other module formats and extensions
// For TS
npx @elastic/synthetics -r ts-node/register --dir tests 

// For ESM
npx @elastic/synthetics -r esm --dir tests
@vigneshshanmugam vigneshshanmugam added the enhancement New feature or request label Oct 12, 2020
@vigneshshanmugam vigneshshanmugam self-assigned this Oct 13, 2020
andrewvc pushed a commit that referenced this issue Oct 15, 2020
fix #84
first class support for TS/JS.
Adds a new flag -r, --require <modules> to preload modules that are required for running various module formats. Examples include handling .ts files via ts-node/register and possible to do ECMAScript modules via esm package through which would be useful for .mjs files
Updated all the examples to be compatible with .journey.ts files to be supported out of the box.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant