Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix ember test command #36

Merged
merged 1 commit into from
Jul 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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