Skip to content

Commit

Permalink
convert test/integration/compiler-globbing.spec.js to unexpected
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
  • Loading branch information
boneskull committed Apr 21, 2018
1 parent 5c0a8d0 commit df748a3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/integration/compiler-globbing.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

var expect = require('expect.js');
var exec = require('child_process').exec;
var path = require('path');

Expand All @@ -9,15 +8,14 @@ describe('globbing like --compilers', function () {
exec('"' + process.execPath + '" "' + path.join('bin', 'mocha') + '" -R json --require coffee-script/register --require test/compiler-fixtures/foo.fixture "test/compiler/*.@(coffee|foo)"', { cwd: path.join(__dirname, '..', '..') }, function (error, stdout) {
if (error && !stdout) { return done(error); }
var results = JSON.parse(stdout);
expect(results).to.have.property('tests');
expect(results, 'to have property', 'tests');
var titles = [];
for (var index = 0; index < results.tests.length; index += 1) {
expect(results.tests[index]).to.have.property('fullTitle');
expect(results.tests[index], 'to have property', 'fullTitle');
titles.push(results.tests[index].fullTitle);
}
expect(titles).to.contain('coffeescript should work');
expect(titles).to.contain('custom compiler should work');
expect(titles).to.have.length(2);
expect(titles, 'to contain', 'coffeescript should work', 'custom compiler should work')
.and('to have length', 2);
done();
});
});
Expand Down

0 comments on commit df748a3

Please sign in to comment.