Skip to content

Commit

Permalink
Merge pull request #41 from wiemanboy/fix/test-config
Browse files Browse the repository at this point in the history
Fix test config
  • Loading branch information
wiemanboy authored Oct 3, 2024
2 parents 8f8d518 + add6645 commit 34148f7
Show file tree
Hide file tree
Showing 6 changed files with 943 additions and 1,550 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
node-version: '22'

- name: Install dependencies
run: npm install && npx playwright install
# Install rollup manually because of bug with optional dependencies (https://github.com/npm/cli/issues/4828)
run: npm install && npm install -D @rollup/rollup-linux-x64-gnu && npx playwright install

- name: Run tests
run: npm test
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Personal Website
# WiemanSite

This is my personal website, built with [SvelteKit](https://kit.svelte.dev/).

Expand All @@ -12,7 +12,7 @@ First install the dependencies:
npm i
```

Then rou are ready to start the development server:
Then you are ready to start the development server:

```bash
npm run dev
Expand Down Expand Up @@ -65,7 +65,7 @@ Reusable components are stored in the `components` directory.

#### HtmlAttributes

To allow for type completion when using HTML attributes on custom components the following pattern can be used:
To allow for type completion when using HTML attributes on custom components, the following pattern can be used:

```sveltehtml
Expand Down Expand Up @@ -96,8 +96,8 @@ script.)
### Styling

This project uses [Tailwind CSS](https://tailwindcss.com/) for styling. You can find the configuration
in `tailwind.config.js`, this is where all the colors are defined. If custom styles are needed I recommend using scss
instead of css.
in `tailwind.config.js`, this is where all the colors are defined. If custom styles are necessary I recommend using scss
instead of CSS.

#### Dark mode

Expand All @@ -112,7 +112,7 @@ locales in the `locales` directory.

#### Usage

To use a translation in a component simply import the `t` function from `svelte-i18n` and use it like this:
To use a translation in a component, import the `t` function from `svelte-i18n` and use it like this:

```sveltehtml
Expand Down Expand Up @@ -166,8 +166,9 @@ const class = container.get<Class>(types.classType);

### Data fetching

For interacting with API data the application uses a repository pattern. This is to allow for easy mocking of data in
tests. Repositories are defined in the `lib/data` directory and use the aforementioned DI.
For interacting with API data, the application uses a repository pattern.
This is to allow for easy mocking of data in tests.
Repositories are defined in the `lib/data` directory and use the aforementioned DI.

#### Structure

Expand Down Expand Up @@ -206,7 +207,7 @@ After the repository is created, it should be bound and used like described in t
### Icons

This project uses [unplugin icons](https://github.com/unplugin/unplugin-icons) for getting different icons. Unplugin
icons uses [Iconify](https://iconify.design/) for getting the icons. If you need to find a specific icon look in
icons use [Iconify](https://iconify.design/) for getting the icons. If you need to find a specific icon look in
the [icon sets](https://icon-sets.iconify.design/).

---
Expand All @@ -218,7 +219,7 @@ end-to-end testing. You can run the tests with `npm run test`, Or use `npm run t
to run the tests separately. Vitest supports coverage reports, to generate a coverage report
use `npm run test:coverage`. Coverage reports will be placed in `test-results/coverage`.

Tests are located in the tests folder, when creating a new test file it should have the same directory structure in
Tests are located in the tests folder; when creating a new test file, it should have the same directory structure in
tests as the file you are testing in src. All test files should end with `.test.ts` and integration tests (using
Playwright) should end with `.integration.test.ts`.

Expand Down
Loading

0 comments on commit 34148f7

Please sign in to comment.