Skip to content

Commit

Permalink
Merge pull request #1640 from navikt/vitest
Browse files Browse the repository at this point in the history
legger til vitest som dependency. Skal benytte vitest for enhetstesting
  • Loading branch information
ViktorGSolberg authored Mar 15, 2024
2 parents 078d89b + e28de26 commit 4088355
Show file tree
Hide file tree
Showing 15 changed files with 2,605 additions and 3,318 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ jobs:
node-version: '18'
cache: npm
registry-url: "https://npm.pkg.github.com"
- name: Build and test
- name: Npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
run: |
npm ci
npm run test-ci
npm run build
run: npm ci
- name: Npm run test
run: npm run test
- name: Npm run build
run: npm run build
- name: Npm build server
working-directory: ./server
env:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/build_n_deploy_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ jobs:
node-version: '18'
cache: npm
registry-url: "https://npm.pkg.github.com"
- name: Npm install and build
- name: Npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE: ${{ github.sha }}
run: |
npm ci
npm run test-ci
npm run build
run: npm ci
- name: Npm run test
run: npm run test
- name: Npm run build
run: npm run build
- name: Npm build server
working-directory: ./server
env:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/build_n_deploy_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ jobs:
node-version: '18'
cache: npm
registry-url: "https://npm.pkg.github.com"
- name: Npm install and build
- name: Npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE: ${{ github.sha }}
run: |
npm ci
npm run test-ci
npm run build
run: npm ci
- name: Npm run test
run: npm run test
- name: Npm run build
run: npm run build
- name: Npm build server
working-directory: ./server
env:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ TOKENX_DOKUMENT=...

Hvis testcafe ikke er installert, kjør en `npm install` ev. installer testcafe globalt hos deg `npm install -g testcafe`

## Testing
Appen benytter [vitest](https://vitest.dev/) til enhetstesting. Legg gjerne til nye tester etter oppdateringer av appen.
For å kjøre opp tester lokalt kan man kjøre `npm run test`. For å kjøre opp testene i interaktiv modus kan man kjøre `npm run vitest`.

## Tekstinnhold
I appen har vi tekstinnhold på norsk bokmål, engelsk og nynorsk.
Ønsker du å legge til eller redigere på en tekst, skal dette gjøres i exceldokumentet "EF Tekstinnhold App Søknadsdialog" som du finner på Teams under Team Familie > Enslig forsørger > Filer > Søknadsdialog > "EF Tekstinnhold App Søknadsdialog".
Expand Down
12 changes: 0 additions & 12 deletions jest.config.ts

This file was deleted.

Loading

0 comments on commit 4088355

Please sign in to comment.