Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Feb 5, 2025
1 parent 483e1bf commit ac28017
Show file tree
Hide file tree
Showing 6 changed files with 347 additions and 47 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ data

*.tar.gz
.secrets
.env*
.env*
notebooks
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"pino-pretty": "^11.0.0",
"prettier": "^3.4.2",
"react-intl": "^6.4.3",
"vite-tsconfig-paths": "^3.5.0",
"vitest": "^2.1.2"
},
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions src/form/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -947,3 +947,5 @@ export type AllowedAddressConfigurations = {
}

export type AdministrativeLevel = 1 | 2 | 3 | 4 | 5

export const moi = 'asd'
67 changes: 36 additions & 31 deletions src/form/v2/birth/__snapshots__/birth.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,54 @@ exports[`birth configuration is parsed 1`] = `
{
"actions": [
{
"allowedWhen": {
"not": {
"properties": {
"$event": {
"conditionals": [
{
"conditional": {
"not": {
"properties": {
"actions": {
"contains": {
"not": {
"properties": {
"draft": {
"const": true,
"$event": {
"properties": {
"actions": {
"contains": {
"not": {
"properties": {
"draft": {
"const": true,
},
},
},
"properties": {
"draft": {
"type": "boolean",
},
"type": {
"const": "DECLARE",
},
},
"required": [
"type",
],
"type": "object",
},
"type": "array",
},
"properties": {
"draft": {
"type": "boolean",
},
"type": {
"const": "DECLARE",
},
},
"required": [
"type",
],
"type": "object",
},
"type": "array",
"required": [
"actions",
],
"type": "object",
},
},
"required": [
"actions",
"$event",
],
"type": "object",
},
"type": "object",
},
"required": [
"$event",
],
"type": "object",
"type": "SHOW",
},
"type": "object",
},
],
"forms": [
{
"active": true,
Expand Down Expand Up @@ -17254,7 +17259,7 @@ exports[`birth configuration is parsed 1`] = `
},
],
"deduplication": [],
"id": "BIRTH",
"id": "birth",
"label": {
"defaultMessage": "Birth declaration",
"description": "This is what this event is referred as in the system",
Expand Down
16 changes: 16 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* OpenCRVS is also distributed under the terms of the Civil Registration
* & Healthcare Disclaimer located at http://opencrvs.org/license.
*
* Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
*/
import { defineConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
plugins: [tsconfigPaths()]
})
Loading

0 comments on commit ac28017

Please sign in to comment.