import RPC from 'phantomjs-promise-es6/lib/rpc';
import {childProcess} from 'node-promise-es6';

describe('RPC', () => {
  it('supports defining and running commands in PhantomJS', async () => {
    const {stdout: phantomVersion} = await childProcess.exec('phantomjs -v');

    const rpc = new RPC({
      version() {
        /* eslint-disable */
        return [
          phantom.version.major,
          phantom.version.minor,
          phantom.version.patch
        ].join('.');
        /* eslint-enable */
      },

      sum(num1, num2, num3) {
        /* eslint-disable */
        return num1 + num2 + num3;
        /* eslint-enable */
      }
    });

    expect(await rpc.version()).toBe(phantomVersion.trim());
    expect(await rpc.sum(3, 5, 7)).toBe(15);
  });
});

@@ -263,24 +263,49 @@
 omjs -v');%0A%0A
+    /* eslint-disable */%0A
     const rp
@@ -340,37 +340,8 @@
 ) %7B%0A
-        /* eslint-disable */%0A
     
@@ -476,36 +476,8 @@
 ');%0A
-        /* eslint-enable */%0A
     
@@ -516,37 +516,8 @@
 ) %7B%0A
-        /* eslint-disable */%0A
     
@@ -547,24 +547,36 @@
 + num3;%0A    
+  %7D%0A    %7D);%0A
     /* eslin
@@ -586,32 +586,16 @@
 nable */
-%0A      %7D%0A    %7D);
 %0A%0A    ex

Deduplicate eslint-disable