Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Commit

Permalink
test: load default config module
Browse files Browse the repository at this point in the history
  • Loading branch information
retrofox committed Feb 15, 2017
1 parent 8d87c84 commit 7bafebc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions test/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import fixture from './fixture';
var configFactory;

try {
configFactory = require( './config' );
configFactory = require( './config' ).default;
} catch ( ex ) {
configFactory = {};
}
Expand All @@ -27,17 +27,13 @@ const env = isClientSide && (
? 'production'
: 'development';

console.log( 'environment: %j', env );

const config = configFactory[ env ] || {};

if ( isClientSide ) {
const clientId = config.oauth.client_id;
console.log( 'clientId: %o', clientId );

qryString = qs.parse( document.location.search.replace( /^\?/, '' ) );
reqHandler = qryString.handler || 'wpcom-proxy-request';
console.log( `reqHandler: %o`, reqHandler );

if (
'wpcom-xhr-request' === reqHandler ||
Expand Down Expand Up @@ -73,7 +69,6 @@ function wpcom() {
reqHandler = qryString.handler || 'wpcom-proxy-request';

if ( 'wpcom-proxy-request' === reqHandler ) {
console.log( 'PROXY request handler' );
let proxy = require( 'wpcom-proxy-request' );
_wpcom = wpcomFactory( proxy );
_wpcom.request( {
Expand Down

0 comments on commit 7bafebc

Please sign in to comment.