-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
1 parent
2da4da8
commit 05db572
Showing
5 changed files
with
168 additions
and
10 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
55 changes: 55 additions & 0 deletions
55
packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/dead-branch/input.mjs
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,55 @@ | ||
Reflect.construct || err; | ||
!Reflect.construct || ok; | ||
|
||
|
||
Reflect.construct ? ok : err; | ||
!Reflect.construct ? err : ok; | ||
|
||
if (Reflect.construct) { | ||
ok; | ||
} else { | ||
err; | ||
} | ||
if (!Reflect.construct) { | ||
err; | ||
} else { | ||
ok; | ||
} | ||
|
||
|
||
Symbol.dispose || err; | ||
!Symbol.dispose || ok; | ||
|
||
|
||
Symbol.dispose ? ok : err; | ||
!Symbol.dispose ? err : ok; | ||
|
||
if (Symbol.dispose) { | ||
ok; | ||
} else { | ||
err; | ||
} | ||
if (!Symbol.dispose) { | ||
err; | ||
} else { | ||
ok; | ||
} | ||
|
||
|
||
a.padStart || err; | ||
!a.padStart || ok; | ||
|
||
|
||
a.padStart ? ok : err; | ||
!a.padStart ? err : ok; | ||
|
||
if (a.padStart) { | ||
ok; | ||
} else { | ||
err; | ||
} | ||
if (!a.padStart) { | ||
err; | ||
} else { | ||
ok; | ||
} |
11 changes: 11 additions & 0 deletions
11
packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/dead-branch/options.json
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,11 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"@@/polyfill-corejs3", | ||
{ | ||
"method": "usage-pure", | ||
"version": "3.34" | ||
} | ||
] | ||
] | ||
} |
41 changes: 41 additions & 0 deletions
41
packages/babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/dead-branch/output.mjs
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,41 @@ | ||
import _Reflect$construct from "core-js-pure/stable/reflect/construct.js"; | ||
import _Symbol from "core-js-pure/stable/symbol/index.js"; | ||
import _padStartInstanceProperty from "core-js-pure/stable/instance/pad-start.js"; | ||
_Reflect$construct; | ||
ok; | ||
ok; | ||
ok; | ||
{ | ||
ok; | ||
} | ||
{ | ||
ok; | ||
} | ||
_Symbol.dispose || err; | ||
!_Symbol.dispose || ok; | ||
_Symbol.dispose ? ok : err; | ||
!_Symbol.dispose ? err : ok; | ||
if (_Symbol.dispose) { | ||
ok; | ||
} else { | ||
err; | ||
} | ||
if (!_Symbol.dispose) { | ||
err; | ||
} else { | ||
ok; | ||
} | ||
_padStartInstanceProperty(a) || err; | ||
!_padStartInstanceProperty(a) || ok; | ||
_padStartInstanceProperty(a) ? ok : err; | ||
!_padStartInstanceProperty(a) ? err : ok; | ||
if (_padStartInstanceProperty(a)) { | ||
ok; | ||
} else { | ||
err; | ||
} | ||
if (!_padStartInstanceProperty(a)) { | ||
err; | ||
} else { | ||
ok; | ||
} |
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