Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: test/call_test.ts

Issue 2416003003: Update package name, update and lock clang-format and tslint versions, and format all source files … (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« package.json ('K') | « package.json ('k') | test/e2e/lib.ts » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 });
OLDNEW
« package.json ('K') | « package.json ('k') | test/e2e/lib.ts » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698