Commit 574166d7 authored by nanahira's avatar nanahira

add more unit tests

parent 3afd64f4
Pipeline #13400 failed with stages
in 14 seconds
......@@ -135,17 +135,23 @@ describe('Reflector', () => {
public c: string;
}
@Metadata.set('foo', 'fifth')
class C extends A {}
class Noop {
public b: string;
}
const a = new A();
const b = new B();
const c = new C();
const noop = new Noop();
expect(reflector.get('foo', A)).toEqual('first');
expect(reflector.get('foo', a)).toEqual('first');
expect(reflector.get('foo', B)).toEqual('first');
expect(reflector.get('foo', b)).toEqual('first');
expect(reflector.get('foo', C)).toEqual('fifth');
expect(reflector.get('foo', c)).toEqual('fifth');
expect(reflector.get('foo', a, 'b')).toEqual('second');
expect(reflector.get('foo', A, 'b')).toEqual('second');
expect(reflector.get('foo', B, 'b')).toEqual('third');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment