Skip to content

Commit

Permalink
Add Jest snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
leonyu committed Sep 20, 2024
1 parent 4aa2e23 commit 22391f6
Show file tree
Hide file tree
Showing 7 changed files with 6,903 additions and 2,140 deletions.
3 changes: 3 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ steps:
- name: node:lts-alpine
entrypoint: npm
args: ['run', 'lint']
- name: node:lts-alpine
entrypoint: npm
args: ['run', 'test']
- name: node:lts-alpine
entrypoint: npm
args: ['run', 'build']
7 changes: 5 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintJest from 'eslint-plugin-jest';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
);
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{ plugins: { jest: eslintJest } }
);
8 changes: 8 additions & 0 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
export default {
testEnvironment: "jsdom",
testMatch: ["<rootDir>/test/**/*.ts"],
transform: {
"^.+.tsx?$": ["ts-jest", {}],
},
};
Loading

0 comments on commit 22391f6

Please sign in to comment.