在下面的代码中,我可以使用
then
而不是
andThen
我看到一切都很好。那么,有什么特别之处呢?
test('Clicked on the About page /about', function(assert) {
visit('/')
.click('a:contains("About")')
.then(function(){
assert.equal(currentURL(), '/about', 'SHould Navigate to about')
})
});
test('Clicked on the About page /about', function(assert) {
visit('/')
.click('a:contains("About")')
.andThen(function(){
assert.equal(currentURL(), '/about', 'SHould Navigate to about')
})
});