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
63e4453
commit dcfe5d4
Showing
24 changed files
with
192 additions
and
17 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
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
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
8 changes: 8 additions & 0 deletions
8
test/function/samples/associate-arrow-function-return-values/_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 function return values with regard to mutations', | ||
exports: function ( exports ) { | ||
assert.equal( exports.bar, 'present' ); | ||
} | ||
}; |
9 changes: 9 additions & 0 deletions
9
test/function/samples/associate-arrow-function-return-values/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,9 @@ | ||
const foo = { mightBeExported: {} }; | ||
const exported = {}; | ||
|
||
const getFoo = () => foo; | ||
|
||
getFoo().mightBeExported = exported; | ||
foo.mightBeExported.bar = 'present'; | ||
|
||
export default exported; |
8 changes: 8 additions & 0 deletions
8
test/function/samples/associate-function-return-values-2/_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 function return values with regard to calls', | ||
exports: function ( exports ) { | ||
assert.equal( exports.bar, 'present' ); | ||
} | ||
}; |
13 changes: 13 additions & 0 deletions
13
test/function/samples/associate-function-return-values-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,13 @@ | ||
const foo = { mightBeExported: {} }; | ||
const exported = {}; | ||
|
||
function getAssignExported () { | ||
return function assignExported ( obj ) { | ||
obj.mightBeExported = exported; | ||
}; | ||
} | ||
|
||
getAssignExported()( foo ); | ||
foo.mightBeExported.bar = 'present'; | ||
|
||
export default exported; |
8 changes: 8 additions & 0 deletions
8
test/function/samples/associate-function-return-values-across-other-expressions/_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 function return values with regard to mutations', | ||
exports: function ( exports ) { | ||
assert.equal( exports.bar, 'present' ); | ||
} | ||
}; |
11 changes: 11 additions & 0 deletions
11
test/function/samples/associate-function-return-values-across-other-expressions/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 getFoo () { | ||
return foo; | ||
} | ||
|
||
(Math.random() < 0.5 ? true && getFoo : false || getFoo)().mightBeExported = exported; | ||
foo.mightBeExported.bar = 'present'; | ||
|
||
export default exported; |
8 changes: 8 additions & 0 deletions
8
test/function/samples/associate-function-return-values/_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 function return values with regard to mutations', | ||
exports: function ( exports ) { | ||
assert.equal( exports.bar, 'present' ); | ||
} | ||
}; |
11 changes: 11 additions & 0 deletions
11
test/function/samples/associate-function-return-values/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 getFoo () { | ||
return foo; | ||
} | ||
|
||
getFoo().mightBeExported = exported; | ||
foo.mightBeExported.bar = 'present'; | ||
|
||
export default exported; |
8 changes: 8 additions & 0 deletions
8
test/function/samples/associate-object-expression-return-values/_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 object expression member parameters with their call arguments', | ||
exports: function ( exports ) { | ||
assert.equal( exports.bar, 'present' ); | ||
} | ||
}; |
12 changes: 12 additions & 0 deletions
12
test/function/samples/associate-object-expression-return-values/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,12 @@ | ||
const foo = { mightBeExported: {} }; | ||
const exported = {}; | ||
const assigner = { | ||
getFoo () { | ||
return foo; | ||
} | ||
}; | ||
|
||
assigner.getFoo().mightBeExported = exported; | ||
foo.mightBeExported.bar = 'present'; | ||
|
||
export default exported; |