gruntjs / grunt-contrib-jasmine

Run jasmine specs headlessly through Headless Chrome
http://gruntjs.com/
MIT License
355 stars 197 forks source link

Jasmine 3.10.0 #343

Closed jbest84 closed 1 year ago

jbest84 commented 2 years ago

The latest version of jasmine-core (3.10.0 and higher) contains two boot files boot0.js and boot1.js. The old boot file boot.js is now a legacyBootFile property and not exported as part of that module.

Reference: https://github.com/jasmine/jasmine/blob/v3.10.0/lib/jasmine-core.js#L8

grunt-contrib-jasmine is using this property here to copy the boot file into the temp folder and assumes a single boot file.

This is breaking templates that include the boot script:

<% with (scripts) { %>
    <% [].concat(polyfills, jasmine, boot, vendor, helpers).forEach(function(script){ %>
    <script src="<%= script %>"></script>
    <% }) %>
  <% }; %>

I can work around this issue by just hard coding in the bootfiles (this will break if the config changes the folder):

<script src=".grunt/grunt-contrib-jasmine/boot0.js"></script>
<script src=".grunt/grunt-contrib-jasmine/boot1.js"></script>
vladikoff commented 1 year ago

This is fixed in version 4.0.0