Skip to content

Commit

Permalink
refactor: update Enzym example, upgrade Vue plugin (#1755)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Aug 2, 2022
1 parent de3910b commit 0e62002
Show file tree
Hide file tree
Showing 10 changed files with 725 additions and 383 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Expand Up @@ -18,7 +18,7 @@
"@iconify-json/carbon": "^1.1.7",
"@types/node": "^17.0.35",
"@unocss/reset": "^0.45.1",
"@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue": "^3.0.1",
"esno": "^0.14.1",
"fast-glob": "^3.2.11",
"https-localhost": "^4.7.1",
Expand Down
2 changes: 0 additions & 2 deletions examples/react-enzyme/components/Button.tsx
@@ -1,5 +1,3 @@
import React from 'react'

const Button = ({ onClick, text }: any) => (
<button className={'some-className'} onClick={onClick}>
{text}
Expand Down
9 changes: 5 additions & 4 deletions examples/react-enzyme/package.json
Expand Up @@ -9,13 +9,14 @@
"react-dom": "^17.0.2"
},
"devDependencies": {
"@types/enzyme": "^3.10.12",
"@types/react": "^17.0.45",
"@types/react-dom": "^17.0.17",
"@vitejs/plugin-react": "1.3.1",
"@vitejs/plugin-react": "latest",
"@vitest/ui": "latest",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"vite": "^2.9.9",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
"enzyme": "^3.11.0",
"vite": "latest",
"vitest": "latest"
},
"stackblitz": {
Expand Down
4 changes: 2 additions & 2 deletions examples/react-enzyme/test/Button.test.tsx
@@ -1,11 +1,11 @@
import React from 'react'
import { shallow } from 'enzyme'
import type { ShallowWrapper } from 'enzyme'
import { beforeEach, describe, expect, test, vi } from 'vitest'

import Button from '../components/Button'

describe('Button component', () => {
let wrapper
let wrapper: ShallowWrapper
const mockedOnSubmit = vi.fn()

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion examples/react-enzyme/vitest.setup.ts
@@ -1,4 +1,4 @@
import Enzyme from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import Adapter from '@wojtekmaj/enzyme-adapter-react-17'

Enzyme.configure({ adapter: new Adapter() })
6 changes: 3 additions & 3 deletions examples/vue-jsx/package.json
Expand Up @@ -6,11 +6,11 @@
"test": "vitest"
},
"devDependencies": {
"@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"@vitejs/plugin-vue": "^3.0.1",
"@vitejs/plugin-vue-jsx": "^2.0.0",
"@vue/test-utils": "^2.0.0",
"jsdom": "latest",
"vite": "^2.9.9",
"vite": "latest",
"vitest": "latest",
"vue": "^3.2.36"
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -64,14 +64,14 @@
"rollup-plugin-license": "^2.8.1",
"simple-git-hooks": "^2.8.0",
"typescript": "^4.7.4",
"vite": "^2.9.12 || ^3.0.0-0",
"vite": "^3.0.4",
"vitest": "workspace:*",
"vue": "^3.2.37"
},
"pnpm": {
"overrides": {
"esbuild": "^0.14.47",
"vite": "^2.9.12",
"vitest>vite": "^3.0.4",
"vitest": "workspace:*"
}
},
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/package.json
Expand Up @@ -45,8 +45,8 @@
"@types/d3-selection": "^3.0.3",
"@types/ws": "^8.5.3",
"@unocss/reset": "^0.45.1",
"@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"@vitejs/plugin-vue": "^3.0.1",
"@vitejs/plugin-vue-jsx": "^2.0.0",
"@vitest/ws-client": "workspace:*",
"@vueuse/core": "^9.0.2",
"ansi-to-html": "^0.7.2",
Expand Down

0 comments on commit 0e62002

Please sign in to comment.