-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Use jest #7455
Use jest #7455
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
"test/**/*.js" | ||
], | ||
"env": { | ||
"mocha": true | ||
"jest": true | ||
} | ||
} | ||
] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,15 +180,17 @@ export default function( | |
if (!deprecationWarningShown) { | ||
deprecationWarningShown = true; | ||
|
||
const deprecationError = new Error( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm ok with just not doing the warning anymore and making this a breaking change. We can just fix this automatically with https://github.com/babel/babel-upgrade There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can do this in a separate PR. |
||
"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.", | ||
); | ||
deprecationError.name = "DeprecationWarning"; | ||
const message = | ||
"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; | ||
|
||
if (process.emitWarning) { | ||
process.emitWarning(deprecationError); | ||
// A string is directly supplied to emitWarning, because when supplying an | ||
// Error object node throws in the tests because of different contexts | ||
process.emitWarning(message, "DeprecationWarning"); | ||
} else { | ||
console.warn(deprecationError); | ||
const deprecationError = new Error(message); | ||
deprecationError.name = "DeprecationWarning"; | ||
console.warn(new Error(message)); | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this still be here? Jest adds it itself (and you removed it from package.json)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch