assertEvalEquals

This commit is contained in:
Peter Cottle 2015-03-23 20:40:24 -07:00
parent 33b92babc0
commit c469368727
2 changed files with 5 additions and 11 deletions

View file

@ -31,14 +31,10 @@ casper.start(
}) })
.wait(500) .wait(500)
.then(function() { .then(function() {
var locale = this.evaluate(function() {
return debug_Intl_getLocale();
});
// Successfully changed locale // Successfully changed locale
this.test.assertEquals( this.test.assertEvalEquals(function() {
locale, return debug_Intl_getLocale();
'ja' }, 'ja');
);
}) })
.then(CasperUtils.testDone); .then(CasperUtils.testDone);
}).run(); }).run();

View file

@ -25,11 +25,9 @@ casper.start(
'div.modalTerminal' 'div.modalTerminal'
])) ]))
.then(function() { .then(function() {
var text = this.evaluate(function() { this.test.assertEvalEquals(function() {
return document.querySelector('div.inside > div > p').innerText; return document.querySelector('div.inside > div > p').innerText;
}); },
this.test.assertEquals(
text,
"Go ahead and try it out on your own! After this " + "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"
); );