Skip to content

Commit

Permalink
test: modify jest config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 4, 2023
1 parent 031ff6a commit 40655ff
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 25 deletions.
4 changes: 2 additions & 2 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ npm install @uiw/react-codemirror --save
| [`@uiw/codemirror-extensions-zebra-stripes`](https://uiwjs.github.io/react-codemirror/#/extensions/zebra-stripes) | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-extensions-zebra-stripes.svg)](https://www.npmjs.com/package/@uiw/codemirror-extensions-zebra-stripes) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-extensions-zebra-stripes.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-extensions-zebra-stripes) |
| [`@uiw/codemirror-themes`](https://uiwjs.github.io/react-codemirror/#/theme/doc) | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-themes.svg)](https://www.npmjs.com/package/@uiw/codemirror-themes) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-themes.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-themes) |

| Name | NPM Version | Website |
| :----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| Name | NPM Version |
| :----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@uiw/codemirror-themes-all`](https://uiwjs.github.io/react-codemirror/#/theme/all) | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-themes-all.svg)](https://www.npmjs.com/package/@uiw/codemirror-themes-all) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-themes-all.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-themes-all) |
| [`@uiw/codemirror-theme-abcdef`](https://uiwjs.github.io/react-codemirror/#/theme/data/abcdef) | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-abcdef.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-abcdef) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-theme-abcdef.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-theme-abcdef) |
| [`@uiw/codemirror-theme-abyss`](https://uiwjs.github.io/react-codemirror/#/theme/data/abyss) | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-abyss.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-abyss) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-theme-abyss.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-theme-abyss) |
Expand Down
4 changes: 1 addition & 3 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"bundle:watch": "ncc watch src/index.tsx --target web --filename codemirror",
"bundle:min": "ncc build src/index.tsx --target web --filename codemirror --minify",
"watch": "tsbb watch src/*.tsx --use-babel",
"build": "tsbb build src/*.tsx --use-babel",
"test": "tsbb test --env=jsdom",
"coverage": "tsbb test --env=jsdom --coverage --bail"
"build": "tsbb build src/*.tsx --use-babel"
},
"repository": {
"type": "git",
Expand Down
3 changes: 0 additions & 3 deletions core/src/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
* @jest-environment jsdom
*/
/* eslint-disable jest/no-conditional-expect */
import React, { useEffect, useRef } from 'react';
import renderer from 'react-test-renderer';
Expand Down
24 changes: 12 additions & 12 deletions example/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
"lint": "next lint"
},
"dependencies": {
"@types/node": "20.6.2",
"@types/react": "18.2.22",
"@types/react-dom": "18.2.7",
"autoprefixer": "10.4.15",
"eslint": "8.49.0",
"eslint-config-next": "13.5.1",
"next": "13.5.1",
"postcss": "8.4.30",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.3.3",
"typescript": "5.2.2"
"@types/node": "~20.8.2",
"@types/react": "^18.2.24",
"@types/react-dom": "^18.2.9",
"autoprefixer": "~10.4.16",
"eslint": "~8.50.0",
"eslint-config-next": "~13.5.4",
"next": "~13.5.4",
"postcss": "~8.4.31",
"react": "~18.2.0",
"react-dom": "~18.2.0",
"tailwindcss": "~3.3.3",
"typescript": "~5.2.2"
},
"devDependencies": {
"@uiw/react-codemirror": "4.21.19",
Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"doc": "npm run-script build --workspace www",
"start": "npm run-script start --workspace www",
"⬆️⬆️⬆️⬆️⬆️ package ⬆️⬆️⬆️⬆️⬆️": "▲▲▲▲▲ package ▲▲▲▲▲",
"test": "lerna exec \"tsbb test\" --scope @uiw/react-codemirror",
"coverage": "lerna exec \"tsbb test --coverage --bail\" --scope @uiw/react-codemirror",
"prepare": "husky install",
"version": "lerna version --exact --force-publish --no-push --no-git-tag-version",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,json}'",
Expand All @@ -30,15 +32,11 @@
"@kkt/ncc": "^1.0.13",
"@types/react-test-renderer": "~18.0.0",
"husky": "~8.0.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-environment-node": "^29.5.0",
"jest-watch-typeahead": "^2.2.2",
"kkt": "^7.2.0",
"lerna": "^7.0.0",
"lint-staged": "^14.0.1",
"prettier": "^3.0.2",
"react-test-renderer": "~18.2.0",
"tsbb": "^4.1.5"
"tsbb": "^4.2.3"
}
}

0 comments on commit 40655ff

Please sign in to comment.