Skip to content

Commit

Permalink
Move the jsdom emulation to after unexpected
Browse files Browse the repository at this point in the history
This ensures that error messages from unexpected are 
syntax highlighted on ansi terminals, due to an "issue" in 
unexpected, where if first detects the DOM, then if not,
 attempts to check for an ansi terminal. Moving the order 
of the requires works around this issue.
  • Loading branch information
bruderstein committed Aug 20, 2015
1 parent bb9552e commit f197ef5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/Select-test.js
@@ -1,8 +1,7 @@
'use strict';
/* global describe, it, beforeEach */

var helper = require('../testHelpers/jsdomHelper');
helper();
var jsdomHelper = require('../testHelpers/jsdomHelper');

var sinon = require('sinon');
var unexpected = require('unexpected');
Expand All @@ -13,6 +12,8 @@ var expect = unexpected
.installPlugin(unexpectedDom)
.installPlugin(unexpectedSinon);

jsdomHelper();

var React = require('react/addons');
var TestUtils = React.addons.TestUtils;

Expand Down

0 comments on commit f197ef5

Please sign in to comment.