use assert equals

This commit is contained in:
Peter Cottle 2015-03-23 20:38:02 -07:00
parent d45651aad2
commit 33b92babc0
3 changed files with 10 additions and 5 deletions

View file

@ -35,7 +35,10 @@ casper.start(
return debug_Intl_getLocale(); return debug_Intl_getLocale();
}); });
// Successfully changed locale // Successfully changed locale
this.test.assert(locale === 'ja'); this.test.assertEquals(
locale,
'ja'
);
}) })
.then(CasperUtils.testDone); .then(CasperUtils.testDone);
}).run(); }).run();

View file

@ -28,8 +28,9 @@ casper.start(
var text = this.evaluate(function() { var text = this.evaluate(function() {
return document.querySelector('div.inside > div > p').innerText; return document.querySelector('div.inside > div > p').innerText;
}); });
this.test.assert( this.test.assertEquals(
text === "Go ahead and try it out on your own! After this " + text,
"Go ahead and try it out on your own! After this " +
"window closes, make two commits to complete the level" "window closes, make two commits to complete the level"
); );
}) })

View file

@ -25,8 +25,9 @@ casper.start(
var text = this.evaluate(function() { var text = this.evaluate(function() {
return document.querySelector('p.helperText').innerText; return document.querySelector('p.helperText').innerText;
}); });
this.test.assert( this.test.assertEquals(
text === 'You can hide this window with "hide goal"' text,
'You can hide this window with "hide goal"'
); );
}) })
.then(CasperUtils.testDone); .then(CasperUtils.testDone);