Skip to content

Commit

Permalink
Debug Github action
Browse files Browse the repository at this point in the history
  • Loading branch information
demccormack committed Oct 14, 2023
1 parent d7b4efc commit 947c6cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ jobs:
- name: Install Node.js dependencies
run: cd frontend && npm install

- name: Copy env file
run: "cp .env.development frontend/.env.test"

- name: Run tests
run: cd frontend && npx vitest --run
run: |
cd frontend
find .. -name '.env*'
npx vitest --run
- name: Lint and format
uses: wearerequired/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions frontend/tests/mocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Films from './Films';
import OfficeSpace from './OfficeSpace';

const handlers = [
rest.get(import.meta.env.VITE_API_ROOT, (req, res, ctx) => {
rest.get('http://127.0.0.1:8080/', (req, res, ctx) => {
const dir = req.url.searchParams.get('dir');

const data =
Expand All @@ -31,7 +31,7 @@ const handlers = [
`),
);
}),
rest.get(`${import.meta.env.VITE_MEDIA_ROOT}welcome`, (req, res, ctx) => {
rest.get(`http://127.0.0.1:8080/welcome`, (req, res, ctx) => {
return res(ctx.status(204));
}),
];
Expand Down

0 comments on commit 947c6cf

Please sign in to comment.