chore(repo): restructure as monorepo with server and client workspaces
- move NestJS app into server/ subdirectory - add client/ React+TypeScript (Vite) app with Hello World - update docker-compose to build and run both services - add root package.json declaring npm workspaces - update .gitignore to cover node_modules and dist at all depths
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
const makePage = () => ({
|
||||
goto: jest.fn(),
|
||||
content: jest.fn().mockResolvedValue("<html></html>"),
|
||||
title: jest.fn().mockReturnValue(""),
|
||||
url: jest.fn().mockReturnValue(""),
|
||||
evaluate: jest.fn(),
|
||||
close: jest.fn(),
|
||||
});
|
||||
|
||||
const makeContext = () => ({
|
||||
newPage: jest.fn().mockResolvedValue(makePage()),
|
||||
addCookies: jest.fn().mockResolvedValue(undefined),
|
||||
addInitScript: jest.fn().mockResolvedValue(undefined),
|
||||
});
|
||||
|
||||
const makeBrowser = () => ({
|
||||
newContext: jest
|
||||
.fn()
|
||||
.mockImplementation(() => Promise.resolve(makeContext())),
|
||||
close: jest.fn(),
|
||||
});
|
||||
|
||||
export const chromium = {
|
||||
launch: jest.fn().mockImplementation(() => Promise.resolve(makeBrowser())),
|
||||
};
|
||||
Reference in New Issue
Block a user