Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: moved the tests into utils folder #577

Merged
merged 1 commit into from
Nov 8, 2023
Merged
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
31 changes: 7 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"preview": "vite preview --port 3004",
"build-preview": "yarn run build && yarn run preview",
"build-preview-e2e": "VITE_APP_IS_E2E=true yarn run build && vite preview --port 3000",
"test": "NODE_ENV=test yarn jest",
"test": "NODE_ENV=test yarn jest --coverage --no-cache",
"test-start": "yarn jest --watch",
"test-coverage": "node ./cypress/coverageTest.js",
"cy-open": "cypress open",
Expand All @@ -88,23 +88,17 @@
"lint": "eslint src --max-warnings 24"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
"extends": ["react-app", "react-app/jest"]
},
"jest": {
"collectCoverage": true,
"collectCoverageFrom": [
"./src/**/*.js",
"./src/**/*.ts"
],
"collectCoverageFrom": ["./src/**/*.js", "./src/**/*.ts"],
"coverageThreshold": {
"global": {
"lines": 0
},
"./src/components/**/utils/**.ts": {
"lines": 92
"lines": 100
},
"./src/utils/": {
"lines": 23,
Expand All @@ -125,16 +119,8 @@
}
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
"production": [">0.2%", "not dead", "not op_mini all"],
"development": ["last 1 chrome version", "last 1 firefox version", "last 1 safari version"]
},
"resolutions": {
"react-error-overlay": "6.0.9"
Expand Down Expand Up @@ -205,10 +191,7 @@
"sourceMap": false,
"all": true,
"include": "src/**/*.{js,jsx,ts,tsx}",
"reporter": [
"html",
"text-summary"
]
"reporter": ["html", "text-summary"]
},
"coverage": {
"min": 30
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { formatBudget } from '../utils'
import { formatBudget } from '..'

describe('formatBudget', () => {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { validateLatitude, validateLongitude } from '../utils'
import { validateLatitude, validateLongitude } from '..'

describe('validateLongitude', () => {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { twitterOrYoutubeRegexOrMp3 } from '../utils'
import { twitterOrYoutubeRegexOrMp3 } from '..'

describe('twitterOrYoutubeRegexOrMp3', () => {
const regex = new RegExp(twitterOrYoutubeRegexOrMp3)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getInputType } from '../utils'
import { getInputType } from '..'
import { LINK, TWITTER_SOURCE, WEB_PAGE } from '~/constants'

describe('youtubeRegex', () => {
Expand Down
Loading