From 85edf95cc8b9b6563b4f3ff75252a804f6241c5e Mon Sep 17 00:00:00 2001 From: Tyler Nullmeier Date: Tue, 25 Jun 2024 12:51:24 -0500 Subject: [PATCH] Add test for page title with nested text I could not find an existing test for this --- server/src/model/page.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/model/page.spec.ts b/server/src/model/page.spec.ts index 807f9614..48136bfd 100644 --- a/server/src/model/page.spec.ts +++ b/server/src/model/page.spec.ts @@ -23,6 +23,11 @@ describe('Page', () => { expect(() => { page.load(pageMaker({ uuid: 'little bobby drop tablesinjection is fun' })) }) .toThrow("Expected one but found 2 results that match '//md:uuid'") }) + it('loads title correctly', () => { + expect(page.isLoaded).toBe(false) + page.load(pageMaker({ title: 'Some text' })) + expect(page.title).toBe('Some text') + }) }) describe('Page validations', () => {