Skip to content

Commit

Permalink
feat: Add more validation for user requests [DEV-3453] (#443)
Browse files Browse the repository at this point in the history
* Refactor controllers

* Make validation using in controllers in the same fashion

* Move potentially failed logic into try-catch

* Rename RevocationController to CredentialStatusController

* Add some validation methods

* Add validators into controller and make format

* Make some fixes for controller validation

* Add more tests for isVerificationMethod

* Fix service validation (#19)

* Fix and add new unit tests

* Add more tests

* Formatting

* Add validation for credentials

* Fix build

* Fix tests and small refactoring

* Enable validation for credentials

* Fix unit tests

* Enable presentation validation

* remove unused import

* Fix imports

* Change expected errors in tests

* npm run format

* Fix presentation validator

* Enable unit tests

* Fix unit tests

* Add cross-env

* Remove unused jet configuration

* Update package-lock.json

* Update .gitignore

* Switch jest config to JSON file

* Update .prettierignore

* Update prettier config

* npm run format

* Revert "Switch jest config to JSON file"

This reverts commit 1b17810.

* Update jest.config.cjs

* Rename files to kebab-case

* Update also-known-as.ts

* Update error messages

* npm run format

* Fix expected errors in tests

* Change expected error string for integration tests

* Fix review PR comments

* lockfile

* Rename also-known-as

* rename files

* Update did-document.ts

* rename credential file

* kebab-case standard

* kebab-case in test files

* move playwright tests

* Update playwright.config.ts

* e2e tests folder

* Update jest.config.cjs

* Move to rootDirs for allowing unit tests to use /src folder

* Fix integration tests due to dir structure changes

---------

Co-authored-by: Ankur Banerjee <ankurdotb@users.noreply.github.com>
  • Loading branch information
Andrew Nikitin and ankurdotb authored Dec 22, 2023
1 parent 054b69e commit 109c518
Show file tree
Hide file tree
Showing 138 changed files with 5,082 additions and 2,531 deletions.
12 changes: 10 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# Ignore folders
.DS_Store
.github
node_modules
/dist
dist
playwright
playwright-report

# Ignore files for PNPM, NPM and YARN
# Ignore files
pnpm-lock.yaml
package-lock.json
yarn.lock
*.md
*.yaml
*.yml
**/tsconfig.json

# Ignore generated files
src/static/swagger.json
30 changes: 15 additions & 15 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
module.exports = {
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
extensionsToTreatAsEsm: [".ts"],
transform: {
"^.+\\.(mt|t|cj|j)s$": [
"ts-jest",
{
useESM: true
}
]
},
testRegex: "/test/.*\\.test\\.ts$",
collectCoverageFrom: ["src/**/*.{ts,js}"],
moduleDirectories: ["node_modules", 'src'],
testEnvironment: 'node',
'^(\\.{1,2}/.*)\\.js$': '$1',
},
extensionsToTreatAsEsm: ['.ts'],
transform: {
'^.+\\.(mt|t|cj|j)s$': [
'ts-jest',
{
useESM: true,
},
],
},
testRegex: '/tests/unit/.*\\.test\\.ts$',
collectCoverageFrom: ['src/**/*.{ts,js}'],
moduleDirectories: ['node_modules', 'src'],
testEnvironment: 'node',
};
7 changes: 0 additions & 7 deletions jestconfig.json

This file was deleted.

Loading

0 comments on commit 109c518

Please sign in to comment.