Skip to content

Commit

Permalink
fix: should import context types
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Feb 3, 2025
1 parent 01b5631 commit 46b153f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import './config/config.default.js';
import './app/extend/application.js';
import './app/extend/context.js';
5 changes: 5 additions & 0 deletions test/view.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ describe('test/view.test.ts', () => {
assert(res.body.locals.data === 1);
assert(res.body.options.opt === 1);
assert(res.body.type === 'ejs');
const ctx = app.mockContext();
assert.equal(typeof ctx.render, 'function');
assert.equal(typeof ctx.renderString, 'function');
assert.equal(typeof ctx.renderView, 'function');
assert.equal(typeof ctx.view.render, 'function');
});

it('should render nunjucks', async () => {
Expand Down

0 comments on commit 46b153f

Please sign in to comment.