angular-cn/tools/transpiler/spec/imports_spec.js

29 lines
750 B
JavaScript
Raw Normal View History

import {describe, it, expect} from 'test_lib/test_lib';
2014-09-25 17:30:10 -04:00
import {Foo, Bar} from './foo';
// TODO: Does not work, as dart does not support renaming imports
2014-09-25 17:30:10 -04:00
// import {Foo as F} from './fixtures/foo';
import * as fooModule from './foo';
2014-09-25 17:30:10 -04:00
import * as exportModule from './export';
2014-09-25 17:30:10 -04:00
import {Type} from 'facade/lang';
2014-09-25 17:30:10 -04:00
export function main() {
describe('imports', function() {
it('should work', function() {
expect(Foo).toBe('FOO');
expect(Bar).toBe('BAR');
// TODO: Does not work
// assert(F == 'FOO');
expect(fooModule.Foo).toBe('FOO');
expect(fooModule.Bar).toBe('BAR');
2014-09-25 17:30:10 -04:00
expect(exportModule.Foo).toBe('FOO');
expect(exportModule.Bar).toBe('BAR');
2014-09-25 17:30:10 -04:00
expect(Type).toBeTruthy();
});
});
2014-09-25 17:30:10 -04:00
}