-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
273 additions
and
48 deletions.
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
const thisFunctionIsNeverInstrumented = () => null; | ||
|
||
module.exports = { | ||
thisFunctionIsNeverInstrumented, | ||
}; |
15 changes: 15 additions & 0 deletions
15
e2e/transform/transformer-config/__tests__/transformer-config.test.js
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
require('../this-directory-is-covered/ExcludedFromCoverage'); | ||
|
||
it('strips flowtypes using babel-jest and config passed to transformer', () => { | ||
const a: string = 'a'; | ||
expect(a).toBe('a'); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"dependencies": { | ||
"@babel/preset-flow": "7.0.0" | ||
}, | ||
"jest": { | ||
"collectCoverageOnlyFrom": { | ||
"<rootDir>/this-directory-is-covered/Covered.js": true, | ||
"<rootDir>/this-directory-is-covered/ExcludedFromCoverage.js": true | ||
}, | ||
"coveragePathIgnorePatterns": [ | ||
"ExcludedFromCoverage" | ||
], | ||
"testEnvironment": "node", | ||
"transform": { | ||
"\\.js$": [ | ||
"babel-jest", | ||
{ | ||
"presets": [ | ||
"@babel/preset-flow" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
e2e/transform/transformer-config/this-directory-is-covered/Covered.js
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
const thisFunctionIsCovered = (): null => null; | ||
|
||
thisFunctionIsCovered(); | ||
|
||
const thisFunctionIsNotCovered = (): void => { | ||
throw new Error('Never Called'); | ||
}; | ||
|
||
module.exports = { | ||
thisFunctionIsCovered, | ||
thisFunctionIsNotCovered, | ||
}; |
15 changes: 15 additions & 0 deletions
15
e2e/transform/transformer-config/this-directory-is-covered/ExcludedFromCoverage.js
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
require('./Covered'); | ||
require('../NotCovered'); | ||
|
||
const thisFunctionIsNeverInstrumented = () => null; | ||
|
||
module.exports = { | ||
thisFunctionIsNeverInstrumented, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
babel-plugin-syntax-flow@^6.8.0: | ||
version "6.18.0" | ||
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" | ||
integrity sha1-TDqyCiryaqIM0lmVw5jE63AxDI0= | ||
|
||
[email protected]: | ||
version "6.8.0" | ||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.8.0.tgz#2351d85e3a52152e1a55d3f08ae635e21ece17a0" | ||
integrity sha1-I1HYXjpSFS4aVdPwiuY14h7OF6A= | ||
dependencies: | ||
babel-plugin-syntax-flow "^6.8.0" | ||
babel-runtime "^6.0.0" | ||
|
||
babel-runtime@^6.0.0: | ||
version "6.23.0" | ||
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" | ||
integrity sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs= | ||
dependencies: | ||
core-js "^2.4.0" | ||
regenerator-runtime "^0.10.0" | ||
|
||
core-js@^2.4.0: | ||
version "2.4.1" | ||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" | ||
integrity sha1-TekR5mew6ukSTjQlS1OupvxhjT4= | ||
|
||
regenerator-runtime@^0.10.0: | ||
version "0.10.4" | ||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.4.tgz#74cb6598d3ba2eb18694e968a40e2b3b4df9cf93" | ||
integrity sha1-dMtlmNO6LrGGlOlopA4rO035z5M= |
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
Oops, something went wrong.