/*eslint strict:0*/
casper.test.begin('prompt tests', 1, function(test) {
    casper.setFilter('page.prompt', function(message, value) {
        return 'Chuck ' + value;
    });
    casper.start('tests/site/prompt.html', function() {
        test.assertEquals(this.getGlobal('name'), 'Chuck Norris', 'prompted value has been received');
    }).run(function() {
        test.done();
    });
});

@@ -171,16 +171,74 @@
     %7D);%0A
+    casper.options.pageSettings.javascriptEnabled = true;%0A
     casp

enable javascript to make test pass with phantomjs2