-
Notifications
You must be signed in to change notification settings - Fork 45.6k
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
Fix test_build_devtools CI job to run test-build-devtools #17631
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
209ced0
Skip abandoned project folders in Jest config
gaearon 549f1be
Fix test_build_devtools to run test-build-devtools
gaearon 3233d78
Exclude console.error plugin for DevTools packages
gaearon 2049b94
Use correct release channel for DevTools tests
gaearon 386796d
Fix TZ dependent test
gaearon 9cea553
Change DT job dependencies
gaearon File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -514,6 +514,7 @@ describe('InspectedElementContext', () => { | |
const arrayOfArrays = [[['abc', 123, true], []]]; | ||
const div = document.createElement('div'); | ||
const exampleFunction = () => {}; | ||
const exampleDateISO = '2019-12-31T23:42:42.000Z'; | ||
const setShallow = new Set(['abc', 123]); | ||
const mapShallow = new Map([['name', 'Brian'], ['food', 'sushi']]); | ||
const setOfSets = new Set([new Set(['a', 'b', 'c']), new Set([1, 2, 3])]); | ||
|
@@ -542,7 +543,7 @@ describe('InspectedElementContext', () => { | |
// eslint-disable-next-line no-undef | ||
big_int={BigInt(123)} | ||
data_view={dataView} | ||
date={new Date(123)} | ||
date={new Date(exampleDateISO)} | ||
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. 🤦♂ |
||
fn={exampleFunction} | ||
html_element={div} | ||
immutable={immutableMap} | ||
|
@@ -634,11 +635,11 @@ describe('InspectedElementContext', () => { | |
|
||
expect(date[meta.inspectable]).toBe(false); | ||
expect(date[meta.type]).toBe('date'); | ||
expect(date[meta.preview_long]).toBe( | ||
'Wed Dec 31 1969 16:00:00 GMT-0800 (Pacific Standard Time)', | ||
expect(new Date(date[meta.preview_long]).toISOString()).toBe( | ||
exampleDateISO, | ||
); | ||
expect(date[meta.preview_short]).toBe( | ||
'Wed Dec 31 1969 16:00:00 GMT-0800 (Pacific Standard Time)', | ||
expect(new Date(date[meta.preview_short]).toISOString()).toBe( | ||
exampleDateISO, | ||
); | ||
|
||
expect(fn[meta.inspectable]).toBe(false); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,11 +68,14 @@ module.exports = { | |
// for test files, we also apply the async-await transform, but we want to | ||
// make sure we don't accidentally apply that transform to product code. | ||
const isTestFile = !!filePath.match(/\/__tests__\//); | ||
const isInDevToolsPackages = !!filePath.match( | ||
/\/packages\/react-devtools.*\// | ||
); | ||
const testOnlyPlugins = [pathToBabelPluginAsyncToGenerator]; | ||
const sourceOnlyPlugins = | ||
process.env.NODE_ENV === 'development' | ||
? [pathToBabelPluginReplaceConsoleCalls] | ||
: []; | ||
const sourceOnlyPlugins = []; | ||
if (process.env.NODE_ENV === 'development' && !isInDevToolsPackages) { | ||
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. ❤️ |
||
sourceOnlyPlugins.push(pathToBabelPluginReplaceConsoleCalls); | ||
} | ||
const plugins = (isTestFile ? testOnlyPlugins : sourceOnlyPlugins).concat( | ||
babelOptions.plugins | ||
); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
lol whoops