feat(test_lib): implement SpyObject

This commit is contained in:
vsavkin
2014-11-25 15:16:53 -08:00
parent 965f70bfbe
commit f06433fb58
7 changed files with 107 additions and 22 deletions

View File

@ -1,22 +1,26 @@
import {ddescribe, describe, it, expect, IS_DARTIUM} from 'test_lib/test_lib';
import {ddescribe, describe, it, iit, expect, IS_DARTIUM} from 'test_lib/test_lib';
import {IMPLEMENTS} from './fixtures/annotations';
class Interface1 {}
class Interface2 {}
class Interface1 {
one(){}
}
class Interface2 {
two(){}
}
@IMPLEMENTS(Interface1, Interface2)
class SomeClass {}
class SomeClass {
one(){}
two(){}
}
export function main() {
describe('interfaces', function() {
//TODO: remvoe when interfaces are supported in AtScript
if (IS_DARTIUM) {
it('should work', function () {
var s = new SomeClass();
expect(s instanceof Interface1).toBeTrue();
expect(s instanceof Interface2).toBeTrue();
});
}
it('should work', function () {
var s = new SomeClass();
expect(s).toImplement(Interface1);
expect(s).toImplement(Interface2);
});
});
}