jest-hbs-extension
Version:
Jest extension to test HBS templates
26 lines (19 loc) • 655 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _matchers = require('./matchers');
var _matchers2 = _interopRequireDefault(_matchers);
var _os = require('os');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = viewsPath => {
const jestExpect = global.expect;
if (jestExpect !== undefined) {
jestExpect.extend((0, _matchers2.default)(viewsPath));
} else {
console.error(```
Unable to find Jest's global expect.${_os.EOL}
Please check you have added jest-hbs-extension correctly to your jest configuration.
```);
}
};