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

Side by Side Diff: test/main_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
OLDNEW
1 /// <reference path="../typings/chai/chai.d.ts"/> 1 /// <reference path="../typings/chai/chai.d.ts"/>
2 /// <reference path="../typings/mocha/mocha.d.ts"/> 2 /// <reference path="../typings/mocha/mocha.d.ts"/>
3 /// <reference path="../typings/source-map/source-map.d.ts"/> 3 /// <reference path="../typings/source-map/source-map.d.ts"/>
4 import chai = require('chai'); 4 import chai = require('chai');
5 import main = require('../lib/main'); 5 import main = require('../lib/main');
6 6
7 import {expectTranslate} from './test_support'; 7 import {expectTranslate} from './test_support';
8 8
9 describe('main transpiler functionality', () => { 9 describe('main transpiler functionality', () => {
10 describe( 10 describe(
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 chai.expect(() => transpiler.getOutputPath('/outside/b/c.js', '/x')) 155 chai.expect(() => transpiler.getOutputPath('/outside/b/c.js', '/x'))
156 .to.throw(/must be located under base/); 156 .to.throw(/must be located under base/);
157 }); 157 });
158 it('defaults to writing to the same location', () => { 158 it('defaults to writing to the same location', () => {
159 let transpiler = new main.Transpiler({basePath: undefined}); 159 let transpiler = new main.Transpiler({basePath: undefined});
160 chai.expect(transpiler.getOutputPath('/a/b/c.js', '/e')).to.equal('/a/b/c. dart'); 160 chai.expect(transpiler.getOutputPath('/a/b/c.js', '/e')).to.equal('/a/b/c. dart');
161 chai.expect(transpiler.getOutputPath('b/c.js', '')).to.equal('b/c.dart'); 161 chai.expect(transpiler.getOutputPath('b/c.js', '')).to.equal('b/c.dart');
162 }); 162 });
163 it('translates .es6, .ts, and .js', () => { 163 it('translates .es6, .ts, and .js', () => {
164 let transpiler = new main.Transpiler({basePath: undefined}); 164 let transpiler = new main.Transpiler({basePath: undefined});
165 ['a.js', 'a.ts', 'a.es6'].forEach( 165 ['a.js', 'a.ts', 'a.es6'].forEach((n) => {
166 (n) => { chai.expect(transpiler.getOutputPath(n, '')).to.equal('a.dart '); }); 166 chai.expect(transpiler.getOutputPath(n, '')).to.equal('a.dart');
167 });
167 }); 168 });
168 }); 169 });
169 }); 170 });
OLDNEW
« package.json ('K') | « test/expression_test.ts ('k') | test/module_test.ts » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698