mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 16:01:40 +03:00
47e00900cc
no issue - change out should.equal for // jshint ignore:line - ensure should is the first require in every test, and ALWAYS require - make sinon the second require, and sandbox the last thing - ALWAYS use sandbox, futureproofs tests against contributors who don't know it - change require formatting
21 lines
558 B
JavaScript
21 lines
558 B
JavaScript
// # Helper Test Utils
|
|
//
|
|
// Contains shared code for intialising tests
|
|
//
|
|
// @TODO refactor this file out of existence
|
|
// I believe if we refactor the handlebars instances and helpers to be more self-contained and modular
|
|
// We can likely have init functions which replace the need for this file
|
|
|
|
var hbs = require('express-hbs'),
|
|
|
|
// Stuff we are testing
|
|
helpers = require('../../../server/helpers'),
|
|
utils = {};
|
|
|
|
utils.loadHelpers = function () {
|
|
var adminHbs = hbs.create();
|
|
helpers.loadCoreHelpers(adminHbs);
|
|
};
|
|
|
|
module.exports = utils;
|