generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1647 from trillium/vite
Merge Vite branch
- Loading branch information
Showing
91 changed files
with
4,135 additions
and
12,062 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
16 | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"mongoUri":"mongodb://127.0.0.1:63857/jest?","mongoDBName":"jest"} | ||
{"mongoUri":"mongodb://127.0.0.1:53806/jest?","mongoDBName":"jest"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from "react"; | ||
import LeaderBoard from "./Leaderboard"; | ||
import { render } from "@testing-library/react"; | ||
import { test, expect } from 'vitest'; | ||
|
||
test("renders without crashing", () => { | ||
const { container } = render(<LeaderBoard />); | ||
expect(container).toMatchSnapshot(); | ||
}); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
client/src/components/__snapshots__/Leaderboard.test.jsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`renders without crashing 1`] = ` | ||
<div> | ||
<div | ||
class="flexcenter-container" | ||
> | ||
<div | ||
class="dashboard-header" | ||
> | ||
<p | ||
class="dashboard-header-text-large" | ||
> | ||
Volunteer Leaderboard | ||
</p> | ||
</div> | ||
<div | ||
class="events-list" | ||
> | ||
<ul /> | ||
</div> | ||
</div> | ||
</div> | ||
`; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions
16
client/src/components/manageProjects/utilities/tests/addDurationToTime.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
const {addDurationToTime} = require('../addDurationToTime') | ||
// const {addDurationToTime} = require('../addDurationToTime') | ||
import {addDurationToTime} from '../addDurationToTime' | ||
import {test, expect} from 'vitest' | ||
|
||
describe('addDurationToTime', () => { | ||
it('adds inputted "0.5" duration to inputted time', () => { | ||
test('adds inputted "0.5" duration to inputted time', () => { | ||
const inputDuration = "0.5" | ||
const inputTime = new Date() | ||
const outputTime = new Date(inputTime.getTime() + (.5*3600000)) | ||
|
||
expect(addDurationToTime(inputTime, inputDuration)).toEqual(outputTime) | ||
}) | ||
|
||
it('adds inputted ".5" duration to inputted time', () => { | ||
test('adds inputted ".5" duration to inputted time', () => { | ||
const inputDuration = ".5" | ||
const inputTime = new Date() | ||
const outputTime = new Date(inputTime.getTime() + (.5*3600000)) | ||
|
||
expect(addDurationToTime(inputTime, inputDuration)).toEqual(outputTime) | ||
}) | ||
|
||
it('adds inputted "3" hour duration to inputted time', () => { | ||
test('adds inputted "3" hour duration to inputted time', () => { | ||
const inputDuration = "3" | ||
const inputTime = new Date() | ||
const outputTime = new Date(inputTime.getTime() + (3*3600000)) | ||
|
||
expect(addDurationToTime(inputTime, inputDuration)).toEqual(outputTime) | ||
}) | ||
|
||
it('throws an error when there is no valid input', () => { | ||
test('throws an error when there is no valid input', () => { | ||
|
||
expect(addDurationToTime).toThrow(new Error('Error: Cannot calculate endTime.')) | ||
}) | ||
}) | ||
}) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { defineConfig, loadEnv } from 'vite' | ||
import react from '@vitejs/plugin-react-swc' | ||
import svgr from "vite-plugin-svgr"; | ||
|
||
export default defineConfig(({ mode }) => { | ||
// Load env file based on`mode in the current working directory. | ||
const env = loadEnv(mode, process.cwd(), ''); | ||
return { | ||
plugins: [ | ||
svgr(), | ||
react(), | ||
], | ||
server: { | ||
port: env.CLIENT_PORT, | ||
host: true, | ||
proxy: { | ||
'/api': { | ||
target: env.REACT_APP_PROXY, | ||
changeOrigin: true, | ||
secure: false, | ||
}, | ||
}, | ||
}, | ||
build: { | ||
outDir: 'build', | ||
}, | ||
test: { | ||
environment: 'jsdom', | ||
}, | ||
}; | ||
}); |
Oops, something went wrong.