mirror of
https://github.com/kevinsqi/react-circular-progressbar.git
synced 2026-01-25 16:03:15 +00:00
add jest setup, WIP porting tests
This commit is contained in:
parent
f92da8dbc9
commit
c0efc187a1
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,6 +4,9 @@
|
||||
# distribution folder
|
||||
/dist
|
||||
|
||||
# coverage
|
||||
/coverage
|
||||
|
||||
.DS_Store
|
||||
|
||||
npm-debug.log*
|
||||
|
||||
5
demo/.env
Normal file
5
demo/.env
Normal file
@ -0,0 +1,5 @@
|
||||
# This is used to skip the error where
|
||||
# e.g. babel-jest is a sub-dependency in the parent dir
|
||||
# but is also used by react-scripts:
|
||||
# "There might be a problem with the project dependency tree"
|
||||
SKIP_PREFLIGHT_CHECK=true
|
||||
9
jest.config.json
Normal file
9
jest.config.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"rootDir": "src",
|
||||
"transform": {
|
||||
"^.+\\.(t|j)sx?$": "ts-jest"
|
||||
},
|
||||
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
||||
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"],
|
||||
"coverageDirectory": "<rootDir>/../coverage"
|
||||
}
|
||||
@ -24,12 +24,15 @@
|
||||
"clean": "rimraf dist",
|
||||
"format": "prettier --write 'src/**/*' 'demo/src/**/*'",
|
||||
"prepare": "npm run clean && npm run build",
|
||||
"start": "tsc -w"
|
||||
"start": "tsc -w",
|
||||
"test": "jest --config jest.config.json --coverage"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^24.0.11",
|
||||
"@types/react": "^16.8.14",
|
||||
"chai": "^3.5.0",
|
||||
"enzyme": "^2.3.0",
|
||||
"jest": "^24.7.1",
|
||||
"jsdom": "^9.0.0",
|
||||
"mocha": "^3.3.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
@ -38,6 +41,7 @@
|
||||
"react-addons-test-utils": "^15.0.2",
|
||||
"react-dom": "^15.4.0",
|
||||
"rimraf": "^2.3.4",
|
||||
"ts-jest": "^24.0.2",
|
||||
"typescript": "^3.4.4"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
5
src/__tests__/CircularProgressbar.test.tsx
Normal file
5
src/__tests__/CircularProgressbar.test.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
describe('<CircularProgressbar />', () => {
|
||||
test('something', () => {
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user