Skip to content

Commit

Permalink
Merge pull request #36 from alexlafroscia/fix-ember-test-command
Browse files Browse the repository at this point in the history
Fix `ember test` command
  • Loading branch information
brzpegasus committed Jul 21, 2015
2 parents cfdb2b1 + d2ffcf9 commit d865a21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = {
var mergeTrees = require('broccoli-merge-trees');
var replace = require('broccoli-string-replace');

if (type === 'all' && process.env.EMBER_ENV === 'test') {
if (type === 'all' && process.env.EMBER_ENV === 'test' && process.env.NW_TEST) {
// Update the base URL in `tests/index.html`
var index = replace(tree, {
files: ['tests/index.html'],
Expand Down Expand Up @@ -76,7 +76,7 @@ module.exports = {
},

contentFor: function(type) {
if (type === 'test-body' && process.env.EMBER_ENV === 'test') {
if (type === 'test-body' && process.env.EMBER_ENV === 'test' && process.env.NW_TEST) {
var testemServer = process.env.NW_TESTEM_SERVER_URL;
if (testemServer) {
return '<script src="' + testemServer + '/socket.io/socket.io.js"></script>';
Expand Down
4 changes: 4 additions & 0 deletions lib/commands/nw-test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ module.exports = {
},

run: function(options) {
// Set environment variable to signal that this is the NW test command
// and not a regular test command
process.env.NW_TEST = true;

options.outputPath = this.tmp();

var promise;
Expand Down

0 comments on commit d865a21

Please sign in to comment.