| OLD | NEW |
| 1 /// <reference path="../typings/mocha/mocha.d.ts"/> | 1 /// <reference path="../typings/mocha/mocha.d.ts"/> |
| 2 import {expectTranslate} from './test_support'; | 2 import {expectTranslate} from './test_support'; |
| 3 | 3 |
| 4 describe('calls', () => { | 4 describe('calls', () => { |
| 5 it('translates destructuring parameters', () => { | 5 it('translates destructuring parameters', () => { |
| 6 expectTranslate('function x({p = null, d = false} = {}) {}').to.equal(`@JS() | 6 expectTranslate('function x({p = null, d = false} = {}) {}').to.equal(`@JS() |
| 7 external x(Object p_d /*{p = null, d = false}*/);`); | 7 external x(Object p_d /*{p = null, d = false}*/);`); |
| 8 expectTranslate('function x({a=false}={a:true})').to.equal(`@JS() | 8 expectTranslate('function x({a=false}={a:true})').to.equal(`@JS() |
| 9 external x(Object a /*{a=false}*/);`); | 9 external x(Object a /*{a=false}*/);`); |
| 10 expectTranslate('function x({a=false}=true)').to.equal(`@JS() | 10 expectTranslate('function x({a=false}=true)').to.equal(`@JS() |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 }`); | 53 }`); |
| 54 }); | 54 }); |
| 55 it('ignore "super.x()" super method calls', () => { | 55 it('ignore "super.x()" super method calls', () => { |
| 56 expectTranslate('class X { y() { super.z(1); } }').to.equal(`@JS() | 56 expectTranslate('class X { y() { super.z(1); } }').to.equal(`@JS() |
| 57 class X { | 57 class X { |
| 58 // @Ignore | 58 // @Ignore |
| 59 X.fakeConstructor$(); | 59 X.fakeConstructor$(); |
| 60 external y(); | 60 external y(); |
| 61 }`); | 61 }`); |
| 62 }); | 62 }); |
| 63 it('suppress new calls without arguments', () => { expectTranslate('new Foo;')
.to.equal(''); }); | 63 it('suppress new calls without arguments', () => { |
| 64 expectTranslate('new Foo;').to.equal(''); |
| 65 }); |
| 64 }); | 66 }); |
| OLD | NEW |