Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: vitest and initial tests #42

Merged
merged 49 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6cd3702
feat: initial vitest setup
Dec 30, 2023
8de4302
feat: starting on shared component tests
Dec 30, 2023
7d37844
feat: add testing library linting
Dec 30, 2023
2029ffa
feat: add jest dom linting
Dec 30, 2023
9210264
feat: shared components tests
Dec 31, 2023
f5b0d3b
feat: tests for nav component/leaf
Dec 31, 2023
b79c496
refactor: exclude wasm dir from coverage
Dec 31, 2023
31daf1d
fix: styled components dropping types
Dec 31, 2023
2851e01
fix: update styled components, proper rnd prop passing
Dec 31, 2023
48a8e94
refactor: exclude test dir from coverage
Dec 31, 2023
8252040
feat: modal body and footer tests
Dec 31, 2023
589e94d
feat: include test files when using eslint
Jan 1, 2024
52f17b3
feat: wrap all context access, more tests, mocking strategy
Jan 4, 2024
0b1e319
feat: exclude files from coverage
Jan 4, 2024
c5ef93c
feat: tests for context access wrapper
Jan 5, 2024
5a8a383
feat: virtual controls form tests
Jan 9, 2024
4637d68
refactor: fix spy/mock reset, virtual controls render initlal values …
Jan 11, 2024
db13155
feat: keybindings form spec
Jan 12, 2024
724362f
feat: download save spec
Jan 14, 2024
221e786
feat: local local rom spec
Jan 14, 2024
1196a28
feat: testing package updates
Jan 14, 2024
c7fb867
refactor: define env vars in .d.ts
Jan 14, 2024
4ce068a
feat: navigation menu spec, add msw
Jan 15, 2024
db950b4
feat: bump msw
Jan 15, 2024
0ec1f52
feat: load rom/save specs
Jan 16, 2024
7171cd5
feat: upload/rom save to server specs
Jan 16, 2024
5386776
feat: login form spec
Jan 16, 2024
60e4d1c
feat: file system modal spec
Jan 18, 2024
43d3f77
feat: modal container spec
Jan 19, 2024
83be42d
feat: pwa prompt spec
Jan 20, 2024
31375c9
chore: periodic package updates
Jan 20, 2024
8b704ff
refactor: keybindings form validation assertions
Jan 20, 2024
620d5f9
refactor: aria label case
Jan 20, 2024
c2a6ece
feat: save states spec
Jan 20, 2024
1e7419c
chore: dedupe packages
Jan 21, 2024
ff20b78
fix: jsdom latency
Jan 21, 2024
6317b08
feat: controls modal spec
Jan 21, 2024
b3a5e6b
refactor: use testing selector
Jan 22, 2024
f57b705
feat: cheats spec
Jan 23, 2024
b2f0f16
feat: upload file modal specs
Jan 26, 2024
4eda476
chore: testing package updates
Jan 26, 2024
316cafa
chore: update test deps
Jan 29, 2024
392c9fb
feat: screen spec
Jan 30, 2024
3cb48ec
chore: testing package updates
Feb 2, 2024
6fc6ee1
refactor: screen initial bounds test
Feb 2, 2024
d22bf17
refactor: screen validate gripper handles
Feb 4, 2024
a5678cd
refactor: screen rename tests
Feb 4, 2024
449f694
refactor: remove explicit timeout
Feb 5, 2024
bd93d9a
feat: control panel spec, accessible buttons
Feb 5, 2024
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
7 changes: 3 additions & 4 deletions .github/workflows/gbajs3.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
run: |
npm run lint

# TODO
# - name: Test
# run: |
# npm run test
- name: Test
run: |
npm run test
17 changes: 15 additions & 2 deletions gbajs3/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@ module.exports = {
'plugin:react-hooks/recommended',
'plugin:import/recommended',
'plugin:jsx-a11y/recommended',
'plugin:styled-components-a11y/recommended'
'plugin:styled-components-a11y/recommended',
'plugin:testing-library/react',
'plugin:jest-dom/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
plugins: ['react-refresh', 'import', 'jsx-a11y', 'styled-components-a11y'],
plugins: [
'react-refresh',
'import',
'jsx-a11y',
'styled-components-a11y',
'testing-library',
'jest-dom'
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'react-refresh/only-export-components': 'warn',
Expand All @@ -34,6 +43,10 @@ module.exports = {
caseInsensitive: true
}
}
],
'testing-library/consistent-data-testid': [
'error',
{ testIdPattern: '^([a-z0-9]+-?:?)+$' }
]
}
};
1 change: 1 addition & 0 deletions gbajs3/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules
dist
dist-ssr
*.local
/**/coverage/*

# Editor directories and files
.vscode/*
Expand Down
2 changes: 1 addition & 1 deletion gbajs3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ npm run lint;
To fix linting issues:

```
npm run lint --fix;
npm run lint -- --fix;
```

To assess vulnerabilities, run:
Expand Down
Loading
Loading