title: Referencing JavaScript files from Jasmine tests
body: <p>I am writing some utilities that I intend to reuse across my JavaScript. This is also a learning exercise on my part. In an attempt to do this, I have the following file:</p>
  
  <p><strong>utilities.js</strong></p>
  
  <pre><code>Object.prototype.AddPrefix = function(prefix) {
      return prefix + this;
  };
  </code></pre>
  
  <p>I intend to call this function in JavaScript like this:</p>
  
  <pre><code>var myString = 'agree';
  myString = myString.AddPrefix('dis');
  </code></pre>
  
  <p>Please note, that is a contrived example. I'm just trying to demonstrate calling the function. Either way, I want to test the AddPrefix function. To do that, I'm using Jasmine. I have the following Jasmine file:</p>
  
  <p><strong>utilities.tests.js</strong></p>
  
  <pre><code>'use strict';
  describe('utilities', function() {
      describe('add prefix', function() {
          it('append dis to string', function() {
              var v = 'agree';
              var actual = v.AddPrefix('dis');
              var expected = 'disagree';
              expect(actual).toBe(expected);
          });
      });
  });
  </code></pre>
  
  <p>The two files, <code>utilities.js</code> and <code>utilities.tests.js</code> are in the same directory. I am executing Jasmine via gulp with the following script:</p>
  
  <p><strong>gulpfile.js</strong></p>
  
  <pre><code>var gulp = require('gulp');
  var jasmine = require('gulp-jasmine');
  
  gulp.task('default', function() {});
  
  gulp.task('test', function() {
      var testFiles = [
          'utilities/utilities.tests.js'
      ];
  
      return gulp
          .src(testFiles)
          .pipe(jasmine());
  });
  </code></pre>
  
  <p>When I execute <code>gulp test</code> from the command-line, I get the following error:</p>
  
  <pre><code>[09:44:33] Using gulpfile C:\Projects\test\gulpfile.js
  [09:44:33] Starting 'test'...
  F
  
  Failures:
  1) utilities add prefix
  1.1) TypeError: Object agree has no method 'AddPrefix'
  
  1 spec, 1 failure
  Finished in 0 seconds
  [09:44:33] 'test' errored after 42 ms
  [09:44:33] Error in plugin 'gulp-jasmine'
  Message:
      Tests failed
  </code></pre>
  
  <p>Its like <code>utilities.tests.js</code> does not know where <code>utilities.js</code> is located. However, I do not know how to reference it. How do I do this?</p>