-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
382f5bd
commit 4d1f946
Showing
8 changed files
with
38 additions
and
16 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
8 changes: 8 additions & 0 deletions
8
test/function/samples/associate-arrow-function-parameter-mutations/_config.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,8 @@ | ||
var assert = require( 'assert' ); | ||
|
||
module.exports = { | ||
description: 'Associates arrow function parameters with their call arguments with regard to mutations', | ||
exports: function ( exports ) { | ||
assert.equal( exports.baz, 'present' ); | ||
} | ||
}; |
13 changes: 13 additions & 0 deletions
13
test/function/samples/associate-arrow-function-parameter-mutations/main.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,13 @@ | ||
const foo = { noEffect: () => {} }; | ||
const bar = {}; | ||
|
||
const addEffect = obj => { | ||
obj.noEffect = () => { | ||
bar.baz = 'present'; | ||
}; | ||
}; | ||
|
||
addEffect( foo ); | ||
foo.noEffect(); | ||
|
||
export default bar; |
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
test/function/samples/associate-function-parameter-mutations-2/main.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,11 @@ | ||
const foo = { mightBeExported: {} }; | ||
const exported = {}; | ||
|
||
function assignExported ( obj ) { | ||
obj.mightBeExported = exported; | ||
} | ||
|
||
assignExported( foo ); | ||
foo.mightBeExported.bar = 'present'; | ||
|
||
export default exported; |
File renamed without changes.
File renamed without changes.
16 changes: 0 additions & 16 deletions
16
test/function/samples/associate-parameter-mutations-2/main.js
This file was deleted.
Oops, something went wrong.