Mocha expect 的行为不符合预期
Mocha expect does not behave as expected
刚刚注意到一些我觉得有点奇怪的东西,以下通过
expect(driver.getCurrentUrl()).to.eventually.contain('Home/Selection/CH')
即使当前的URL是www.someurl.com/Home/Selection/XX并且不包含Home/Selection/CH
这是为什么?
好的,知道了:
expect(driver.getCurrentUrl()).to.contain('Home/Selection/CH')
刚刚注意到一些我觉得有点奇怪的东西,以下通过
expect(driver.getCurrentUrl()).to.eventually.contain('Home/Selection/CH')
即使当前的URL是www.someurl.com/Home/Selection/XX并且不包含Home/Selection/CH
这是为什么?
好的,知道了:
expect(driver.getCurrentUrl()).to.contain('Home/Selection/CH')