mirror of https://github.com/lukechilds/rollup.git
Rich Harris
10 years ago
3 changed files with 35 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||
var assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'correct statement order is preserved even in weird edge cases', |
|||
context: { |
|||
getAnswer: function ( obj ) { |
|||
return obj.answer; |
|||
} |
|||
}, |
|||
exports: function ( exports ) { |
|||
assert.equal( exports, 'right' ); |
|||
}, |
|||
solo: true, |
|||
show: true |
|||
}; |
@ -0,0 +1,17 @@ |
|||
var prop, |
|||
answer; |
|||
|
|||
var foo = { answer: 'wrong' }; |
|||
var bar = { answer: 'right' }; |
|||
|
|||
if ( typeof bar === "object" ) { |
|||
for ( prop in bar ) { |
|||
if ( bar.hasOwnProperty(prop) ) { |
|||
foo[prop] = bar[prop]; |
|||
} |
|||
} |
|||
} |
|||
|
|||
answer = getAnswer( foo ); |
|||
|
|||
export default answer; |
@ -0,0 +1,3 @@ |
|||
import answer from './answer'; |
|||
var answer2 = answer; |
|||
export default answer2; |
Loading…
Reference in new issue