re-added tests for when we ever decide to use them

This commit is contained in:
2023-03-24 18:27:28 +01:00
parent f6e8242d25
commit 1ed86161f1
3 changed files with 16 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ jobs:
run: npm install run: npm install
- name: Build - name: Build
run: npm run build run: npm run build
- name: Test
run: npm test -- --watch=false
deploy: deploy:
runs-on: self-hosted runs-on: self-hosted
needs: build needs: build

9
src/App.test.tsx Normal file
View File

@@ -0,0 +1,9 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';
test('Home screen contains \'MauMau\'', () => {
render(<App />);
const linkElement = screen.getByText(/MauMau/i);
expect(linkElement).toBeInTheDocument();
});

5
src/setupTests.ts Normal file
View File

@@ -0,0 +1,5 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';