diff --git a/test/absolutes.js b/test/absolutes_spec.js similarity index 100% rename from test/absolutes.js rename to test/absolutes_spec.js diff --git a/test/params.js b/test/params_spec.js similarity index 100% rename from test/params.js rename to test/params_spec.js diff --git a/test/xray_driver_spec.js b/test/xray_driver_spec.js new file mode 100644 index 0000000..8dd42ff --- /dev/null +++ b/test/xray_driver_spec.js @@ -0,0 +1,20 @@ +/* global it, describe */ + +'use strict' + +var Xray = require('..') +var phantom = require('x-ray-phantom') +var assert = require('assert') + +describe('Xray.driver(fn)', function () { + it('should support basic phantom', function (done) { + var x = Xray() + .driver(phantom()) + + x('http://www.google.com/ncr', 'title')(function (err, str) { + if (err) return done(err) + assert.equal('Google', str) + done() + }) + }) +}) diff --git a/test/index.js b/test/xray_spec.js similarity index 95% rename from test/index.js rename to test/xray_spec.js index 05af5ac..733e408 100644 --- a/test/index.js +++ b/test/xray_spec.js @@ -1,11 +1,10 @@ -/* global it, xit, describe, xdescribe */ +/* global it, xit, describe */ /** * Module dependencies */ var m = require('multiline').stripIndent -var phantom = require('x-ray-phantom') var concat = require('concat-stream') var read = require('fs').readFileSync var cheerio = require('cheerio') @@ -25,7 +24,7 @@ var url = 'http://lapwinglabs.github.io/static/' * Tests */ -describe('Xray()', function () { +describe('Xray basics', function () { it('should work with the kitchen sink', function (done) { var x = Xray() x({ @@ -264,7 +263,7 @@ describe('Xray()', function () { }) describe('.format()', function () { - it('should support adding formatters', function () { + xit('should support adding formatters', function () { // TODO }) }) @@ -359,17 +358,4 @@ describe('Xray()', function () { }) }) }) - - xdescribe('.driver(fn)', function () { - it('should support basic phantom', function (done) { - var x = Xray() - .driver(phantom()) - - x('http://www.google.com/ncr', 'title')(function (err, str) { - if (err) return done(err) - assert.equal('Google', str) - done() - }) - }) - }) })