Skip to content

Instantly share code, notes, and snippets.

@mdix
Created January 28, 2014 10:11
Show Gist options
  • Save mdix/8665089 to your computer and use it in GitHub Desktop.
Save mdix/8665089 to your computer and use it in GitHub Desktop.
grunt -vvvv dalek:phantom
Running tasks: dalek:phantom
Running "dalek:phantom" (dalek) task
Verifying property dalek.phantom exists in config...OK
Files: src/spec/test_phantom_chrome.js
Options: browser=["phantomjs"]
Fatal error: Unexpected token E
/* globals module*/
module.exports = function(grunt) {
    grunt.initConfig({
dalek: {
chrome: {
options: {
browser: ['chrome']
},
src: 'src/spec/**/*chrome*.js'
},
phantom: {
options: {
browser: ['phantomjs']
},
src: 'src/spec/**/*phantom*.js'
}
}
});
 
grunt.loadNpmTasks('grunt-dalek');
    grunt.registerTask('default', ['dalek']);
};
{
"name": "Testproject",
"version": "0.1.0",
"description": "A simple testproject.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": "",
"author": "",
"license": "BSD",
"devDependencies": {
"grunt": "~0.4.2",
"dalekjs": "0.0.8",
"grunt-dalek": "~0.2.0",
"dalek-browser-chrome": "0.0.9"
}
}
module.exports = {
'body element exists': function(test) {
test
.open('http://google.de')
.assert.exists('body', 'body exists')
.done();
}
}
module.exports = {
'head element exists': function (test) {
test
.open('http://google.de')
.assert.exists('head', 'body exists')
.done();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment