Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit 86ae226

Browse files
committed
Don't run handlebars unit tests if handlebars isn't installed
1 parent fe2ea00 commit 86ae226

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/engine_handlebars_tests.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
var object_factory = require('../builder/object_factory');
1111
var testPatternsPath = path.resolve(__dirname, 'files', '_handlebars-test-patterns');
1212

13+
try {
14+
require('handlebars');
15+
} catch (err) {
16+
console.log('handlebars renderer not installed; skipping tests');
17+
return;
18+
}
19+
1320
// fake pattern lab constructor:
1421
// sets up a fake patternlab object, which is needed by the pattern processing
1522
// apparatus.

0 commit comments

Comments
 (0)