fix: copy templates to the distribution
This commit is contained in:
14
tests/engine/PageRenderer.templateRoots.test.ts
Normal file
14
tests/engine/PageRenderer.templateRoots.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { resolvePageRendererTemplateRoots } from '../../src/main/engine/PageRenderer';
|
||||
|
||||
describe('resolvePageRendererTemplateRoots', () => {
|
||||
it('includes templates under process resources path for packaged app builds', () => {
|
||||
const roots = resolvePageRendererTemplateRoots({
|
||||
moduleDir: '/Applications/Blogging Desktop Server.app/Contents/Resources/app.asar/dist/main/engine',
|
||||
cwd: '/tmp/runtime-cwd',
|
||||
resourcesPath: '/Applications/Blogging Desktop Server.app/Contents/Resources',
|
||||
});
|
||||
|
||||
expect(roots).toContain('/Applications/Blogging Desktop Server.app/Contents/Resources/templates');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user