feat(test_lib): implement SpyObject
This commit is contained in:
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user