mirror of https://github.com/lukechilds/rollup.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
413 B
10 lines
413 B
var assert = require( 'assert' );
|
|
|
|
module.exports = {
|
|
description: 'detect side effect in member expression assignment when not top level',
|
|
code: function ( code ) {
|
|
assert.equal( code.indexOf( 'function set(key, value) { foo[key] = value; }' ) >= 0, true, code );
|
|
assert.equal( code.indexOf( 'set("bar", 2);' ) >= 0, true, code );
|
|
assert.equal( code.indexOf( 'set("qux", 3);' ) >= 0, true, code );
|
|
}
|
|
};
|
|
|