Skip to content

Commit

Permalink
Vklass: Run tests with nx
Browse files Browse the repository at this point in the history
  • Loading branch information
ptz0n committed Dec 16, 2021
1 parent 1598a7e commit 5debb9a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 8 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The respective README files there contain more detailed descriptions.
* [api](#api)
* [api-skolplattformen](#api-skolplattformen)
* [api-hjarntorget](#api-hjarntorget)
* [api-vklass](#api-vklass)
* [curriculum](#curriculum)
* [hooks](#hooks)
* [Getting started with development](#getting-started-with-development)
Expand All @@ -46,8 +47,8 @@ The respective README files there contain more detailed descriptions.

The project consists of several apps and libraries inside [a NX](https://nx.dev/) monorepo.

### Apps
/apps/ contains the application projects. This is the main entry point for a runnable application.
### Apps
/apps/ contains the application projects. This is the main entry point for a runnable application.

#### skolplattformen

Expand All @@ -64,7 +65,7 @@ For more information, check out the [source code](apps/skolplattformen-app).
The code for the website at https://skolplattformen.org/. It's built using Next.js.

For more information, check out the [source code](apps/website).
### Libs
### Libs

/libs/ contains the library projects. There are many different kinds of libraries, and each library defines its own external API so that boundaries between libraries remain clear.

Expand All @@ -74,7 +75,11 @@ The base for all api implementations

#### api-hjarntorget

The implementation for the school platform in Gothenburg called Hjärntorget
The implementation for the school platform in Gothenburg called Hjärntorget.

#### api-vklass

The implementation for the school platform Vklass.

#### api-skolplattformen

Expand All @@ -84,6 +89,7 @@ It also makes it easier for others to develop their own applications for the Sko
**Pro tip:** If you don't want the API to make requests to the back-end, you can turn on _fake mode_ to return static data instead. \
Do so by logging in using 12121212121212 or 1212121212 as your personal identity number.
Check out the documentation [here](libs/api-skolplattformen).

#### curriculum

Translations of curriculum codes (sv: ämneskoder på schemat) to clear text descriptions
Expand All @@ -95,7 +101,7 @@ Check out the documentation [here](libs/hooks).

## Getting started with Development

To clone and build the project, you first need to install [git](https://git-scm.com/), [node](https://nodejs.org/en/) and [yarn](https://classic.yarnpkg.com/lang/en/docs/install/).
To clone and build the project, you first need to install [git](https://git-scm.com/), [node](https://nodejs.org/en/) and [yarn](https://classic.yarnpkg.com/lang/en/docs/install/).

Clone the repo with
```bash
Expand Down
23 changes: 23 additions & 0 deletions libs/api-vklass/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"root": "libs/api-vklass",
"sourceRoot": "libs/api-vklass/src",
"projectType": "library",
"targets": {
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/api-vklass/**/*.{ts,tsx,js,jsx}"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/api-skolplattformen"],
"options": {
"jestConfig": "libs/api-vklass/jest.config.js",
"passWithNoTests": true
}
}
},
"tags": []
}
2 changes: 1 addition & 1 deletion libs/api-vklass/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
"**/__tests__/*",
"**/__mocks__/*"
]
}
}
5 changes: 3 additions & 2 deletions workspace.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"version": 2,
"projects": {
"api": "libs/api",
"api-hjarntorget": "libs/api-hjarntorget",
"api-skolplattformen": "libs/api-skolplattformen",
"api-test-app": "apps/api-test-app",
"api-vklass": "libs/api-vklass",
"api": "libs/api",
"curriculum": "libs/curriculum",
"hooks": "libs/hooks",
"api-test-app": "apps/api-test-app",
"skolplattformen-app": "apps/skolplattformen-app"
}
}

0 comments on commit 5debb9a

Please sign in to comment.