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
b4ae7b7
commit a967910
Showing
10 changed files
with
11 additions
and
9 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
2 changes: 1 addition & 1 deletion
2
...lugin-transform-block-scoping/test/fixtures/const-violations/deadcode-violation/output.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
2 changes: 1 addition & 1 deletion
2
...transform-block-scoping/test/fixtures/const-violations/destructuring-assignment/output.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
2 changes: 1 addition & 1 deletion
2
packages/babel-plugin-transform-block-scoping/test/fixtures/const-violations/loop/output.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
2 changes: 1 addition & 1 deletion
2
...ransform-block-scoping/test/fixtures/const-violations/nested-update-expressions/output.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
2 changes: 1 addition & 1 deletion
2
...bel-plugin-transform-block-scoping/test/fixtures/const-violations/no-assignment/output.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
function _readOnlyError(name) { throw new Error("\"" + name + "\" is read-only"); } | ||
function _readOnlyError(name) { throw new TypeError("\"" + name + "\" is read-only"); } | ||
|
||
var MULTIPLIER = 5; | ||
MULTIPLIER = (_readOnlyError("MULTIPLIER"), "overwrite"); |
2 changes: 1 addition & 1 deletion
2
...s/babel-plugin-transform-block-scoping/test/fixtures/const-violations/no-for-in/output.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
2 changes: 1 addition & 1 deletion
2
...transform-block-scoping/test/fixtures/const-violations/update-expression-prefix/output.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
function _readOnlyError(name) { throw new Error("\"" + name + "\" is read-only"); } | ||
function _readOnlyError(name) { throw new TypeError("\"" + name + "\" is read-only"); } | ||
|
||
var a = "str"; | ||
_readOnlyError("a"), --a; |
2 changes: 1 addition & 1 deletion
2
...plugin-transform-block-scoping/test/fixtures/const-violations/update-expression/output.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
function _readOnlyError(name) { throw new Error("\"" + name + "\" is read-only"); } | ||
function _readOnlyError(name) { throw new TypeError("\"" + name + "\" is read-only"); } | ||
|
||
var foo = 1; | ||
_readOnlyError("foo"), foo++; |
2 changes: 2 additions & 0 deletions
2
packages/babel-plugin-transform-block-scoping/test/fixtures/exec/constant-violation.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,2 @@ | ||
const a = 1; | ||
expect(() => { a = 2 }).toThrow(TypeError); |