feat(scenario): run logs, lint/format tooling, CONTRIBUTING
- add ScenarioRunLogEntity to persist step script output to DB - stepLogger dual-writes to NestJS logger and DB (fire-and-forget) - add GET /scenarios/:id/run/:runId returning run, stepRuns and logs - add POST /scenarios/:id/run/:runId/wait (polls until terminal state) - 9 new integration tests for the two endpoints (136 total) - add eslint with typescript-eslint and eslint-config-prettier - add npm scripts: format, lint, lint:fix - resolve all lint errors across src and test (no any types) - add CONTRIBUTING.md covering dev workflow
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
const mockElement = {
|
||||
outerHTML: '<div id="mock">mock content</div>',
|
||||
textContent: 'mock content',
|
||||
textContent: "mock content",
|
||||
};
|
||||
|
||||
export class JSDOM {
|
||||
constructor(public html: string, public options?: any) {}
|
||||
constructor(
|
||||
public html: string,
|
||||
public options?: Record<string, unknown>,
|
||||
) {}
|
||||
get window() {
|
||||
return {
|
||||
document: {
|
||||
querySelector: (_selector: string) => mockElement,
|
||||
querySelector: () => mockElement,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ export const chromium = {
|
||||
newContext: jest.fn().mockResolvedValue({
|
||||
newPage: jest.fn().mockResolvedValue({
|
||||
goto: jest.fn(),
|
||||
content: jest.fn().mockResolvedValue('<html></html>'),
|
||||
title: jest.fn().mockReturnValue(''),
|
||||
url: jest.fn().mockReturnValue(''),
|
||||
content: jest.fn().mockResolvedValue("<html></html>"),
|
||||
title: jest.fn().mockReturnValue(""),
|
||||
url: jest.fn().mockReturnValue(""),
|
||||
evaluate: jest.fn(),
|
||||
close: jest.fn(),
|
||||
}),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export class Readability {
|
||||
constructor(private doc: any) {}
|
||||
constructor(private doc: unknown) {}
|
||||
parse() {
|
||||
return { textContent: '' };
|
||||
return { textContent: "" };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user