Browse Source

failing tests - tricky case with unused declarators in multiple var declaration

contingency-plan
Rich-Harris 10 years ago
parent
commit
7cd858be60
  1. 3
      test/function/unused-var-a/_config.js
  2. 2
      test/function/unused-var-a/foo.js
  3. 4
      test/function/unused-var-a/main.js
  4. 3
      test/function/unused-var-b/_config.js
  5. 2
      test/function/unused-var-b/foo.js
  6. 4
      test/function/unused-var-b/main.js
  7. 3
      test/function/unused-var-c/_config.js
  8. 2
      test/function/unused-var-c/foo.js
  9. 4
      test/function/unused-var-c/main.js
  10. 3
      test/function/unused-var-d/_config.js
  11. 5
      test/function/unused-var-d/foo.js
  12. 4
      test/function/unused-var-d/main.js

3
test/function/unused-var-a/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'omits unused var declaration (a)'
};

2
test/function/unused-var-a/foo.js

@ -0,0 +1,2 @@
var unused = 'unused', foo = 'foo', bar = 'bar';
export { foo, bar };

4
test/function/unused-var-a/main.js

@ -0,0 +1,4 @@
import { foo, bar } from './foo';
assert.equal( foo, 'foo' );
assert.equal( bar, 'bar' );

3
test/function/unused-var-b/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'omits unused var declaration (b)'
};

2
test/function/unused-var-b/foo.js

@ -0,0 +1,2 @@
var foo = 'foo', unused = 'unused', bar = 'bar';
export { foo, bar };

4
test/function/unused-var-b/main.js

@ -0,0 +1,4 @@
import { foo, bar } from './foo';
assert.equal( foo, 'foo' );
assert.equal( bar, 'bar' );

3
test/function/unused-var-c/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'omits unused var declaration (c)'
};

2
test/function/unused-var-c/foo.js

@ -0,0 +1,2 @@
var foo = 'foo', bar = 'bar', unused = 'unused';
export { foo, bar };

4
test/function/unused-var-c/main.js

@ -0,0 +1,4 @@
import { foo, bar } from './foo';
assert.equal( foo, 'foo' );
assert.equal( bar, 'bar' );

3
test/function/unused-var-d/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'omits unused var declaration (d)'
};

5
test/function/unused-var-d/foo.js

@ -0,0 +1,5 @@
var unused_a = 'a', unused_b = 'b';
var unused_c = 'c';
var foo = 'foo', bar = 'bar';
export { foo, bar };

4
test/function/unused-var-d/main.js

@ -0,0 +1,4 @@
import { foo, bar } from './foo';
assert.equal( foo, 'foo' );
assert.equal( bar, 'bar' );
Loading…
Cancel
Save