chore: Update ha-nunjucks to 1.6.2 (#2549)

- Replaces:
https://github.com/dermotduffy/advanced-camera-card/pull/2515
This commit is contained in:
Dermot Duffy
2026-06-30 17:45:13 -07:00
committed by dermotduffy
parent 015fb1876d
commit c3d3dd3934
15 changed files with 113 additions and 14 deletions
@@ -8,8 +8,15 @@ import type {
BrowseMediaMetadata,
RichBrowseMedia,
} from '../../../../src/ha/browse-media/types';
import { createHASS, createMockTemplateRenderer } from '../../../test-utils';
import {
createHASS,
createMockTemplateRenderer,
stubConnectedHomeAssistant,
} from '../../../test-utils';
// The `with template matcher` test loads the real ha-nunjucks engine, which
// reads `window`/`document` at import, so this suite needs a DOM environment.
// @vitest-environment jsdom
describe('MediaMatcher', () => {
// A mock renderer for the matcher plumbing, which never renders templates.
// The `value_template` suite below uses its own real, loaded engine.
@@ -153,6 +160,7 @@ describe('MediaMatcher', () => {
// renderer (rather than the shared mock).
const templateManager = new TemplateManager();
beforeAll(async () => {
stubConnectedHomeAssistant();
await templateManager.loadRenderer();
});