title: Access variable from another file in JS
body: <p>in my test folder I have two files: an api test (postAdduser.js) and another of the protractor (sendPush.js).</p>
  
  <p><strong>postAdduser.js</strong></p>
  
  <pre><code>var assert = require('chai').assert,
      request = require('supertest'),
      util = require('/Users/rafael/Desktop/projects/my-project/tests/API/spec/util.js'),
      expect = require('chai').expect;
  
  var storeId;
  var session    = null;
  var rut;
  
  describe('Register valid user', function() {
  
      before(function (done) {
          request(util.url)
            .post('/admin/login')
            .send(util.adminLogin)
            .end(function(err, res) {
              if (err) return done(err);
              session = res.header['set-cookie'];
              done();
            });
      });
  
    this.timeout(60000);
    it('Add valid user', function(done) {
      request(util.url)
        .post('/api/v1/users')
        .set('Content-type', 'application/json')
        .send(util.addValidUser)
        .end(function(err, res) {
          if (err) return done(err);
          var results = res.body;
          assert.equal(res.status, 200);
          expect(results).to.include(util.addValidUser);
          storeId = res.body._id;
          rut = res.body.rut;
          done();
        });
    });
  </code></pre>
  
  <p><strong>sendPush.js</strong></p>
  
  <pre><code>var HomePage = require('../pages/homePage.js');
  var LoginPage = require('../pages/loginPage.js');
  var Search = require ('../pages/searchPage.js');
  var SendPush = require ('../pages/sendPush.js');
  require('/Users/rafael/Desktop/projects/my-project/tests/UI/spec/postAddUser.js');
  
  
  describe('Send notifications to RUT', function() {
  
    before(function() {
      describe('Register valid user', function() {
        console.log(rut);
      });
      HomePage.get();
    });
  
    it('should log in in admin', function() {
      LoginPage.login();
    });
  
    it('search for valid RUT', function() {
      Search.searchRut('73667143');
    });
  
    it('send push to RUT', function() {
      SendPush.sendPush();
    });
  
    after(function () {
      browser.quit();
    });
  });
  </code></pre>
  
  <p>see that in the BEFORE <strong>(sendPush.js)</strong> test I want to store the variable <strong>RUT</strong> that is being used on test <strong>postAddUser.js</strong></p>
  
  <p>How can I do that?</p>
  
  <p>cheers,
  rafael</p>