cleanup(build): remove traceur-based Dart transpiler

This commit is contained in:
Alex Eagle
2015-04-28 11:14:18 -07:00
parent 3d62546314
commit 4c1e978536
20 changed files with 2 additions and 1710 deletions

View File

@ -12,83 +12,6 @@ var DEFAULT_OPTIONS = {
memberVariables: true // parse class fields
};
describe('transpile to dart', function(){
var options;
beforeEach(function() {
options = merge(DEFAULT_OPTIONS, {outputLanguage: 'dart'});
});
// https://github.com/angular/angular/issues/509
describe('string interpolation', function() {
it('should not interpolate inside old quotes', function(){
var result = compiler.compile(options, "test.js",
"var a:number = 1;" +
"var s1:string = \"${a}\";" +
"var s2:string = '\\${a}';" +
"var s3:string = '$a';");
expect(result.js).toBe("library test;\n" +
"num a = 1;\n" +
"String s1 = \"\\${a}\";\n" +
"String s2 = '\\${a}';\n" +
"String s3 = '\\$a';\n");
});
it('should not interpolate without curly braces', function() {
var result = compiler.compile(options, "test.js",
"var a:number = 1;" +
"var s1:string = `$a`;" +
"var s2:string = `\\$a`;");
expect(result.js).toBe("library test;\n" +
"num a = 1;\n" +
"String s1 = '''\\$a''';\n" +
"String s2 = '''\\$a''';\n");
});
it('should interpolate inside template quotes', function() {
var result = compiler.compile(options, "test.js",
"var a:number = 1;" +
"var s1:string = `${a}`;");
expect(result.js).toBe("library test;\n" +
"num a = 1;\n" +
"String s1 = '''${a}''';\n");
});
});
describe('generic', function() {
it('should support types without generics', function() {
var result = compiler.compile(options, "test.js",
"var a:List = [];");
expect(result.js).toBe("library test;\nList a = [];\n");
});
it('should support one level generics', function() {
var result = compiler.compile(options, "test.js",
"var a:List<string> = [];");
expect(result.js).toBe("library test;\nList<String> a = [];\n");
});
it('should support multiple one level generics', function() {
var result = compiler.compile(options, "test.js",
"var a:List<A,B> = [];");
expect(result.js).toBe("library test;\nList<A, B> a = [];\n");
});
it('should support nested generics', function() {
var result = compiler.compile(options, "test.js",
"var a:List<A<B>> = [];");
expect(result.js).toBe("library test;\nList<A<B>> a = [];\n");
});
it('should add dart suffix to reserved words', function() {
var result = compiler.compile(options, "project/if.js",
"var a;");
expect(result.js).toBe("library project.if_dart;\nvar a;\n");
});
});
});
describe('transpile to es6', function() {
var options;