Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
- name: Install dependencies
run: yarn

- name: Start server
run: yarn start &

- name: Run unit tests (Vitest)
env:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
Expand Down
5 changes: 3 additions & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ module.exports = defineConfig({
chromeWebSecurity: false,
video: true,
env: {
HOST: 'https://ffiec.cfpb.gov',
ENVIRONMENT: 'NOT CI',
HOST: 'http://localhost:3000',
ENVIRONMENT: 'CI',
USERNAME: 'frontend.testing@mailinator.com',
INSTITUTION: 'FRONTENDTESTBANK9999',
MAPBOX_ACCESS_TOKEN: 'XXXXXXXX',
TEST_DELAY: 1000,
ACTION_DELAY: 1000,
NAV_DELAY: 5000,
Expand Down
22 changes: 1 addition & 21 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,6 @@ import svgr from 'vite-plugin-svgr'
dotenv.config()

if (!process.env.MAPBOX_ACCESS_TOKEN) {
throw new Error(
`
__ __ _______ __ __ _______ _______ ______ _______ _______ _______
| | | || || | | | | || || _ | | || || |
| |_| || _ || | | | | ___|| _ || | || | ___|| _ ||_ _|
| || | | || |_| | | |___ | | | || |_||_ | | __ | | | | | |
|_ _|| |_| || | | ___|| |_| || __ || || || |_| | | |
| | | || | | | | || | | || |_| || | | |
|___| |_______||_______| |___| |_______||___| |_||_______||_______| |___|
_______ _______ __ __ _______ _______ __ __ ___ __ _ _______
| || || |_| || || || | | || | | | | || |
| _____|| _ || || ___||_ _|| |_| || | | |_| || ___|
| |_____ | | | || || |___ | | | || | | || | __
|_____ || |_| || || ___| | | | || | | _ || || |
_____| || || ||_|| || |___ | | | _ || | | | | || |_| |
|_______||_______||_| |_||_______| |___| |__| |__||___| |_| |__||_______|

👉 MAPBOX_ACCESS_TOKEN environment variable is not defined. Please set it in your .env file. 👈
`,
)
}

dns.setDefaultResultOrder('verbatim')
Expand All @@ -39,7 +19,7 @@ export default () => {
environment: 'jsdom',
globals: true,
include: ['src/**/__tests__/**/*.{test,spec}.{js,jsx}'],
exclude: ['oldTests/**', 'cypress/**', '**/node_modules/**']
exclude: ['oldTests/**', 'cypress/**', '**/node_modules/**'],
},
define: {
'import.meta.env.MAPBOX_ACCESS_TOKEN': JSON.stringify(
Expand Down
Loading