Make Karma fail test on syntax error

333 views Asked by At

When a test of ours has a syntax error we get something like this:

WARNING in ./tests/components/RequesterInfo/RequsterInfo.spec.js
Module build failed: SyntaxError: /Volumes/dev/VisualforceCore/tests/components/RequesterInfo/RequsterInfo.spec.js: Unexpected token, expected , (34:39)
  32 |             TimeZoneSidKey: 'America/Indiana/Indianapolis',
  33 |             Title: 'CTO',
> 34 |             SatisfactionLevel__c: value: 'Low',
     |                                        ^
  35 |           }
  36 |           fieldSet: {
  37 |             LanguageLocaleKey: { label: 'Language' },

We often miss this error as it gets swallowed up in all the output Can I make karma fail on a syntax error?

0

There are 0 answers