import GraphQLJSClient from '../src/graphql-client';

function recordTypes() {
  const types = GraphQLJSClient.trackedTypes();

  if (typeof require === 'function') {
    const body = JSON.stringify({'profiled-types': types}, null, 2);

    require('fs').writeFileSync('profiled-types.json', body);
  } else {
    console.log(types); // eslint-disable-line no-console
  }
}

before(() => {
  if (!GraphQLJSClient.startTracking) {
    return;
  }

  GraphQLJSClient.startTracking();
});

after(() => {
  if (!GraphQLJSClient.startTracking) {
    return;
  }

  GraphQLJSClient.pauseTracking();
  recordTypes();
});

import GraphQLJSClient from '../src/graphql-client';

function recordTypes() {
  const types = GraphQLJSClient.trackedTypes();

  if (typeof require === 'function') {
    const body = JSON.stringify({'profiled-types': types}, null, '  ');

    require('fs').writeFileSync('profiled-types.json', body);
  } else {
    console.log(types); // eslint-disable-line no-console
  }
}

before(() => {
  if (!GraphQLJSClient.startTracking) {
    return;
  }

  GraphQLJSClient.startTracking();
});

after(() => {
  if (!GraphQLJSClient.startTracking) {
    return;
  }

  GraphQLJSClient.pauseTracking();
  recordTypes();
});

--- 
+++ 
@@ -4,7 +4,7 @@
   const types = GraphQLJSClient.trackedTypes();
 
   if (typeof require === 'function') {
-    const body = JSON.stringify({'profiled-types': types}, null, '  ');
+    const body = JSON.stringify({'profiled-types': types}, null, 2);
 
     require('fs').writeFileSync('profiled-types.json', body);
   } else {
Use a number instead of hard coded spaces in json stringify
