Skip to content
This repository was archived by the owner on Feb 19, 2022. It is now read-only.
Open
Changes from 1 commit
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 dev/spec-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var MochaAdapter = rowdy.adapters.mocha;

var SERVER_HOST = "127.0.0.1";
var SERVER_PORT = "3000";
var DEV_SERVER_TIMEOUT = 20000;
var DEV_SERVER_TIMEOUT = process.env.TEST_FUNC_DEV_SERVER_TIMEOUT || 20000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GLOBAL: Prefer npm config style variables that can be overridden either by env or by package.json:config

See https://github.com/FormidableLabs/builder#npm-config

The result would be something (and sorry it's long) like:

var DEV_SERVER_TIMEOUT = process.env.npm_package_config_test_func_dev_server_timeout || 20000;

var ELEM_WAIT = 200;

// Base directory for app on server, e.g., /open-source/victory
Expand Down Expand Up @@ -71,7 +71,7 @@ var serveDev = function (cb) {
hostname: SERVER_HOST,
port: SERVER_PORT,
path: global.TEST_FUNC_BASE_DIR + "/"
}, function (res) {
}, function () {
cb();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we capture / respond to errors here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

});
});
Expand Down