Commit 9c850d0e authored by nanahira's avatar nanahira

fix

parent 38736642
Pipeline #7357 passed with stages
in 54 seconds
......@@ -17,8 +17,6 @@ describe('Schema dict', () => {
bar: number;
}
const sym = Symbol();
@RegisterSchema()
class MyConfig {
constructor(_: any) {}
......@@ -32,7 +30,7 @@ describe('Schema dict', () => {
@SchemaProperty({ dict: true, type: MyProperty, default: {} })
myProperties: Record<string, MyProperty>;
@SchemaProperty({ dict: true, type: MyProperty, default: {} })
@SchemaProperty({ dict: true, type: MyProperty, default: [] })
myPropertiesArr: Record<string, MyProperty>[];
}
......@@ -62,7 +60,6 @@ describe('Schema dict', () => {
it('should throw on invalid', () => {
expect(() => new MyConfig({ foo: 1 })).toThrow();
expect(() => new MyConfig({ foo: { bar: 1 } })).toThrow();
expect(() => new MyConfig({ [sym]: { bar: 'baz' } })).toThrow();
expect(() => new MyConfig({ fooAndBar: { foo: 'not number' } })).toThrow();
expect(() => new MyConfig({ fooAndBar: { somethingElse: 4 } })).toThrow();
});
......
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