Skip to content

Instantly share code, notes, and snippets.

@grantmacken
Created January 24, 2016 01:10
Show Gist options
  • Save grantmacken/92b113ca7a1864c1f561 to your computer and use it in GitHub Desktop.
Save grantmacken/92b113ca7a1864c1f561 to your computer and use it in GitHub Desktop.
tap tests nightmate and tape inoked with prove
#!/usr/bin/env node
var test = require('tape');
var Nightmare = require('nightmare');
var properties = require('properties-parser').read('./config');
var website = 'http://' + properties.NAME
test('example tap test using nightmare and tape', function (t) {
t.plan(1);
new Nightmare()
.goto(website)
.evaluate(function(){
return document.title
},function( title ){
t.equal(title, properties.NAME, 'home page document title should repo name');
} )
.run();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment