tsgrp / HPI

OpenContent Management Suite (OCMS)
http://www.tsgrp.com/products
17 stars 5 forks source link

Unit test issue with regex filter #912

Open alieblich opened 8 years ago

alieblich commented 8 years ago

When running unit tests using the regex filter, there seems to be an issue with the jasmine library getting included. The only spec file that I have noticed the error in is createFolderSpec.

The error doesn't show up when running all the unit test without the regex filter, and the error also doesn't show up while debugging the unit tests in Chrome.The error only shows up while running the following grunt command in the console.

grunt buildRuntimeConfig karma:jenkins --project=wizard-alfresco --env=orchard --specFilepathRegex=/createFolder.*Spec.js/ --verbose

jasmineerror

It seems that the error is occurring when trying to call 'waitsFor'.

@dgrumieaux

ghost commented 8 years ago

In addition to this, it would be really handy if we ran the unit tests for the file you're working on every time you save. So that way if you're working in createFolder.js , createFolderSpec.js would run after you save so that you're aware of any breaks that may have occurred. As it is now, you won't be aware of the break until you get to writing your unit tests, and at that point, it might require a large refactoring.