Skip to content

Commit

Permalink
test: moved the tests into utils folder (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevkevinpal authored Nov 8, 2023
1 parent 0abda1c commit 1b4ea7c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 28 deletions.
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

0 comments on commit 1b4ea7c

Please sign in to comment.