Note that there are some explanatory texts on larger screens.

plurals
  1. POGrunt Jasmine task using full path so it does not automatically append '.js' onto the end of my requirejs files
    text
    copied!<p>I am trying to set up grunt to run a jasmine task.</p> <p>Here is my jasmine json for the Gruntfile.js</p> <pre><code>jasmine: { src: '../app/src/**/*.js', options: { specs: '../app/test/spec/**/*.js', template: require('grunt-template-jasmine-requirejs'), templateOptions: { requireConfigFile: '../app/src/main.js', requireConfig: { baseUrl: '../app/src', paths: { 'text': '../libs/requirejs/text', 'jquery': '../libs/jquery/jquery-1.9.1', 'jqueryui': '../libs/jqueryui/jquery-ui-1.10.2', 'lodash': '../libs/lodash/lodash-underscore.min', 'backbone': '../libs/backbone/backbone', 'relational': '../libs/backbone.relational/backbone.relational', 'marionette': '../libs/backbone.marionette/backbone.marionette', 'handlebars': '../libs/backbone.handlebars/handlebars', 'bootstrap': '../libs/bootstrap/bootstrap', 'async': '../libs/async/async' }, shim: { lodash: { exports: '_' }, backbone: { deps: ['lodash', 'jquery'], exports: 'Backbone' }, relational: { deps: ['backbone', 'lodash', 'jquery'], exports: 'Backbone' }, marionette: { deps: ['backbone', 'extend'], exports: 'Backbone.Marionette' }, handlebars: { exports: 'Handlebars' }, bootstrap: { deps: ['jquery'], exports: '$.fn.popover' }, async: { exports: 'async' } }//, //name: 'main' } } } } </code></pre> <p>FYI: I have tried with and without name: 'main' commented.</p> <p>The problem is that it shows the correct list of files if I try to load up the _SpecRunner.html it generates but for trying to pull in the list of files it never appends the '.js' to the end. In the require list, they are listed without the'.js' and I get that because they aren't supposed to have the '.js' unless its a full path. But they are listing as full path but I wouldn't imagine they need to be and that is where my problem lies.</p> <pre><code>require([ '/Users/&lt;username&gt;/dirs/to/app/src/application' , '/Users/&lt;username&gt;/dirs/to/app/src/collections/content/actions'....], function() {...}); </code></pre> <p>For testing I am simply doing a command-line: grunt jasmine call and I get the error below for each of the files:</p> <pre><code>&gt;&gt; Error: scripterror: Illegal path or script error: ['/Users/&lt;username&gt;/dirs/to/app/src/views/toolbar/toolbar'] at &gt;&gt; _SpecRunner.html:21 &gt;&gt; .grunt/grunt-contrib-jasmine/require.js:12 v &gt;&gt; .grunt/grunt-contrib-jasmine/require.js:29 </code></pre> <p>Is there something I am setting in the above config that implies that I want to use the full path?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload