From d900bec8b4399f7c5f6af66d0800d11fd5ba9d64 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 7 Dec 2015 15:43:49 +0800 Subject: [PATCH] update test --- package.json | 1 - tests/popover.test.js | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 22ef6f1492..4391824864 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,6 @@ "eslint-plugin-babel": "^3.0.0", "eslint-plugin-markdown-antd": "0.0.0", "eslint-plugin-react": "^3.3.1", - "expect.js": "~0.3.1", "extract-text-webpack-plugin": "^0.9.1", "gh-pages": "^0.5.0", "history": "^1.13.1", diff --git a/tests/popover.test.js b/tests/popover.test.js index 0fe9095d24..0504ef90dc 100644 --- a/tests/popover.test.js +++ b/tests/popover.test.js @@ -1,5 +1,4 @@ import React from 'react'; -import expect from 'expect.js'; import TestUtils from 'react-addons-test-utils'; jest.dontMock('../components/popover/index'); @@ -14,16 +13,16 @@ describe('Popover', function() { ); - expect(popover.getPopupDomNode()).to.be(undefined); + expect(popover.getPopupDomNode()).toBe(undefined); TestUtils.Simulate.click( TestUtils.findRenderedDOMComponentWithTag(popover, 'a') ); const popup = popover.getPopupDomNode(); - expect(popup).not.to.be(undefined); - expect(popup.className).to.contain('ant-popover-placement-top'); - expect(popup.innerHTML).to.match(/
code<\/div>/); - expect(popup.innerHTML).to.match(/
console\.log\('hello world'\)<\/div>/); + expect(popup).not.toBe(undefined); + expect(popup.className).toContain('ant-popover-placement-top'); + expect(popup.innerHTML).toMatch(/
code<\/div>/); + expect(popup.innerHTML).toMatch(/
console\.log\('hello world'\)<\/div>/); }); });