Skip to content

Commit c08a99b

Browse files
MQ37Copilot
andauthored
feat: more tests, tiny refactor (#69)
* snapshot - crawler tests, standby tests, fix linter issues, move standby server to separate file, add content callback handler so we can work with extracted content in tests * install playwright cicd * Update src/server.ts Co-authored-by: Copilot <[email protected]> * port to number input * Refactor request handlers and remove complex callback logic, use spying for testing * eslint -> 9 * just return server no const --------- Co-authored-by: Copilot <[email protected]>
1 parent 358c6d7 commit c08a99b

25 files changed

+1187
-1258
lines changed

Diff for: .github/workflows/checks.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Code Checks
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 'latest'
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build
26+
run: npm run build
27+
28+
- name: Lint
29+
run: npm run lint
30+
31+
- name: Install Playwright
32+
run: npx playwright install
33+
34+
- name: Test
35+
run: npm run test

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ storage
99

1010
# Added by Apify CLI
1111
.venv
12+
.aider*
13+
14+
# Actor run input
15+
input.json

Diff for: eslint.config.mjs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import apifyTypescriptConfig from '@apify/eslint-config/ts.js';
2+
3+
// eslint-disable-next-line import/no-default-export
4+
export default [
5+
{ ignores: ['**/dist'] }, // Ignores need to happen first
6+
...apifyTypescriptConfig,
7+
{
8+
languageOptions: {
9+
sourceType: 'module',
10+
11+
parserOptions: {
12+
project: 'tsconfig.eslint.json', // Or your other tsconfig
13+
},
14+
},
15+
},
16+
];

0 commit comments

Comments
 (0)