Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion email_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
15 changes: 11 additions & 4 deletions src/firebase/firestore.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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');
});
});

Expand Down
Loading