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

Cant use es6 imports in globalSetup #5724

Closed
amiralies opened this issue Mar 5, 2018 · 2 comments
Closed

Cant use es6 imports in globalSetup #5724

amiralies opened this issue Mar 5, 2018 · 2 comments

Comments

@amiralies
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
my code base is written in es6 also my test files.
now i need to run a globalSetup script but i cant use es6 in it.
it throws SyntaxError: Unexpected token import

my jest config:

module.exports = {
  testEnvironment: 'node',
  globalSetup: './scripts/globalSetup.js',
};

What is the expected behavior?
globalSetup script run w/o errors;

Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.

jest: 22.4.2
node: v8.9.4 LTS
yarn: 1.5.1
OS: Ubuntu 16.04

@thymikee
Copy link
Collaborator

thymikee commented Mar 5, 2018

Duplicate of #5164

@thymikee thymikee marked this as a duplicate of #5164 Mar 5, 2018
@thymikee thymikee closed this as completed Mar 5, 2018
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants