Last active
August 29, 2015 14:03
-
-
Save asciidisco/33f44e2c58fd01d333e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = { | |
'Can move data around': function (test) { | |
test.open('http://localhost:5001/about.html') | |
// executed in browser scope | |
.execute(function () { | |
var message = Math.random().toString(36).substring(7); | |
this.data('lastMessage', message); | |
}) | |
// executed in node scope | |
.log.message(function () { | |
// do some weird node stuff here | |
var fs = require('fs'); | |
fs.writeFileSync('foo.txt', test.data('lastMessage')); | |
return test.data('lastMessage'); // outputs the message if dalek is started with -l 4 | |
}) | |
.done(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment