From cda5198207c608d6d98c13e49093978445bd8039 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 9 Jul 2016 18:10:11 +0800 Subject: [PATCH 1/8] upgrade devDeps --- package.json | 6 +++--- tests/index.test.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 65f9e71213..37c7dda668 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "devDependencies": { "antd-tools": "^0.8.0", "babel-eslint": "^6.0.2", - "babel-jest": "^12.0.2", + "babel-jest": "^13.2.2", "babel-plugin-antd": "^0.4.0", "bisheng": "^0.7.1", "bisheng-plugin-antd": "0.1.0", @@ -86,7 +86,7 @@ "dora-plugin-upload": "^0.3.1", "enquire.js": "^2.1.1", "es6-shim": "^0.35.0", - "eslint": "^2.2.0", + "eslint": "^3.0.1", "eslint-config-airbnb": "^9.0.1", "eslint-plugin-babel": "^3.0.0", "eslint-plugin-import": "^1.6.1", @@ -97,7 +97,7 @@ "history": "^2.0.1", "intl": "^1.2.2", "intl-locales-supported": "^1.0.0", - "jest-cli": "^12.0.2", + "jest-cli": "^13.2.3", "jsonml-to-react-component": "~0.2.0", "jsonml.js": "^0.1.0", "jsonp": "^0.2.0", diff --git a/tests/index.test.js b/tests/index.test.js index 898be2913d..824aa07ecb 100644 --- a/tests/index.test.js +++ b/tests/index.test.js @@ -6,6 +6,7 @@ import path from 'path'; describe('antd dist files', function() { const distFilesExisted = fs.existsSync(path.join(process.cwd(), 'dist', 'antd.js')); if (!distFilesExisted) { + it('empty test case placeholder', () => {}); return; } else { jest.unmock('../dist/antd'); From 72c431e7913a4115f99c5750328467e47af1d153 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 9 Jul 2016 18:30:09 +0800 Subject: [PATCH 2/8] update test case --- tests/popover.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/popover.test.js b/tests/popover.test.js index ebd609f07e..21638f2eb5 100644 --- a/tests/popover.test.js +++ b/tests/popover.test.js @@ -21,7 +21,7 @@ describe('Popover', function() { ); const popup = popover.getPopupDomNode(); - expect(popup).not.toBe(undefined); + expect(popup).not.toBe(null); expect(popup.className).toContain('ant-popover-placement-top'); expect(popup.innerHTML).toMatch(/
code<\/div>/); expect(popup.innerHTML).toMatch(/
console\.log\('hello world'\)<\/div>/); From 8ec15e4ad39446189bd0982a34e0141b62cbfa51 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 10 Jul 2016 15:09:34 +0800 Subject: [PATCH 3/8] Fix Input value warning close #2333, close #2332 --- components/input/Input.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/input/Input.jsx b/components/input/Input.jsx index db6ed6ae28..36b7e7c1a4 100644 --- a/components/input/Input.jsx +++ b/components/input/Input.jsx @@ -156,7 +156,7 @@ export default class Input extends Component { }); if ('value' in props) { - props.value = fixControlledValue(props.value); + otherProps.value = fixControlledValue(props.value); // Input elements must be either controlled or uncontrolled, // specify either the value prop, or the defaultValue prop, but not both. delete otherProps.defaultValue; From 5856bb1b30559fc3c332923443b5cf0f29a50d43 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 10 Jul 2016 15:16:24 +0800 Subject: [PATCH 4/8] Fix key warning --- components/form/FormItem.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index 5ad6576557..5482cbe61d 100644 --- a/components/form/FormItem.jsx +++ b/components/form/FormItem.jsx @@ -161,8 +161,8 @@ export default class FormItem extends React.Component { } return props.label ? ( - -