diff --git a/email_intro.md b/email_intro.md index a98e71d..4fc24f1 100644 --- a/email_intro.md +++ b/email_intro.md @@ -4,7 +4,7 @@ Hi everyone, I wanted to share a tool I've been building that I think many of you will find useful: LaTeX Forge (https://latexforge.web.app). -What is it? +What is it? LaTeX Forge is a lightweight, web-based LaTeX editor -- think of it as a simpler alternative to Overleaf. You write LaTeX in your browser, hit compile, and get a PDF. No software to install, no subscription required. diff --git a/src/firebase/firestore.test.js b/src/firebase/firestore.test.js index 52def34..d5cf296 100644 --- a/src/firebase/firestore.test.js +++ b/src/firebase/firestore.test.js @@ -45,14 +45,15 @@ describe('firestore module', () => { }); describe('createProject', () => { - it('creates a project and a default main.tex file', async () => { + it('creates a project with main.tex and references.bib', async () => { mockAddDoc .mockResolvedValueOnce({ id: 'proj-123' }) // project doc - .mockResolvedValueOnce({ id: 'file-1' }); // main.tex + .mockResolvedValueOnce({ id: 'file-1' }) // main.tex + .mockResolvedValueOnce({ id: 'file-2' }); // references.bib const id = await createProject('user-1', 'My Project'); expect(id).toBe('proj-123'); - expect(mockAddDoc).toHaveBeenCalledTimes(2); + expect(mockAddDoc).toHaveBeenCalledTimes(3); // First call: project doc const projectData = mockAddDoc.mock.calls[0][1]; @@ -64,7 +65,13 @@ describe('firestore module', () => { const fileData = mockAddDoc.mock.calls[1][1]; expect(fileData.name).toBe('main.tex'); expect(fileData.type).toBe('tex'); - expect(fileData.content).toContain('\\documentclass{article}'); + expect(fileData.content).toContain('\\documentclass'); + + // Third call: references.bib file + const bibData = mockAddDoc.mock.calls[2][1]; + expect(bibData.name).toBe('references.bib'); + expect(bibData.type).toBe('tex'); + expect(bibData.content).toContain('@article'); }); });