Skip to content

Commit

Permalink
chore(tests): [RO-26598] Update to make it clear the view engine is a…
Browse files Browse the repository at this point in the history
… mock
  • Loading branch information
otrreeves committed Apr 5, 2024
1 parent 61c193b commit 61c62d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/fixtures/controllers/PromiseMiddlewareTestController.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = function (BaseController, Promise) {
configure(app) {
super.configure(app);

app.engine('ott', (filePath, options, callback) => {
const mockOpenTableTemplateViewEngine = (filePath, options, callback) => {
fs.readFile(filePath, (err, content) => {
const { settings, _locals, cache, ...vars } = options;
let rendered = content.toString();
Expand All @@ -14,7 +14,9 @@ module.exports = function (BaseController, Promise) {
});
return callback(null, rendered);
});
});
};

app.engine('ott', mockOpenTableTemplateViewEngine);
app.set('views', `${__dirname}/views`);

app.get('/promise-middleware-test--jsonasync', this.getJsonAsync);
Expand Down

0 comments on commit 61c62d7

Please sign in to comment.