angular-docs-cn/tools/transpiler/spec/interfaces_spec.js

27 lines
493 B
JavaScript
Raw Normal View History

import {ddescribe, describe, it, iit, expect} from 'angular2/test_lib';
import {IMPLEMENTS} from './fixtures/annotations';
2014-11-25 18:16:53 -05:00
class Interface1 {
one(){}
}
class Interface2 {
two(){}
}
@IMPLEMENTS(Interface1, Interface2)
2014-11-25 18:16:53 -05:00
class SomeClass {
one(){}
two(){}
}
export function main() {
describe('interfaces', function() {
2014-11-25 18:16:53 -05:00
it('should work', function () {
var s = new SomeClass();
expect(s).toImplement(Interface1);
expect(s).toImplement(Interface2);
});
});
}