mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
10 years ago
6 changed files with 27 additions and 1 deletions
@ -0,0 +1,3 @@ |
|||||
|
module.exports = { |
||||
|
description: 'assumes methods may mutate objects passed in, and self' |
||||
|
}; |
@ -0,0 +1,5 @@ |
|||||
|
import object from './object'; |
||||
|
import thing from './thing'; |
||||
|
|
||||
|
assert.ok( object.mutated ); |
||||
|
assert.ok( thing.methodWasCalled ); |
@ -0,0 +1,6 @@ |
|||||
|
import thing from './thing'; |
||||
|
|
||||
|
var object = {}; |
||||
|
thing.mutate( object ); |
||||
|
|
||||
|
export default object; |
@ -0,0 +1,8 @@ |
|||||
|
export default { |
||||
|
mutate: function ( object ) { |
||||
|
object.mutated = true; |
||||
|
this.methodWasCalled = true; |
||||
|
}, |
||||
|
|
||||
|
methodWasCalled: false |
||||
|
}; |
Loading…
Reference in new issue