瀏覽代碼

test(types): fix dts test

Evan You 6 年之前
父節點
當前提交
c409d4f297
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      test-dts/defineComponent.test-d.tsx

+ 2 - 2
test-dts/defineComponent.test-d.tsx

@@ -172,9 +172,9 @@ describe('with object props', () => {
 
   // wrong prop types
   expectError(
-    <MyComponent a={'wrong type'} b="foo" dd={['foo']} ddd={['foo']} />
+    <MyComponent a={'wrong type'} b="foo" dd={{ n: 1 }} ddd={['foo']} />
   )
-  expectError(<MyComponent b="foo" dd={[123]} ddd={['foo']} />)
+  expectError(<MyComponent b="foo" dd={{ n: 'string' }} ddd={['foo']} />)
 })
 
 describe('type inference w/ optional props declaration', () => {