Skip to content

Commit 5bf10b1

Browse files
authored
Merge pull request #203 from wojtekmaj/vitest
Migrate to Vitest
2 parents 2f48b36 + 5b4b2de commit 5bf10b1

24 files changed

Lines changed: 555 additions & 1846 deletions

.eslintrc.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,4 @@ module.exports = {
44
rules: {
55
'prettier/prettier': 2,
66
},
7-
overrides: [
8-
{
9-
files: '**/__tests__/*.js',
10-
env: { jest: true },
11-
},
12-
],
137
}

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"types": "index.d.ts",
77
"scripts": {
88
"build": "rollup ./src/index.js -o index.js --f cjs && babel index.js -o index.js",
9-
"test": "jest",
10-
"test:watch": "jest --watch",
9+
"test": "vitest",
10+
"test:watch": "vitest --watch",
1111
"lint": "eslint src",
1212
"prepublish": "npm run build",
1313
"precommit": "lint-staged",
@@ -35,21 +35,19 @@
3535
"url": "https://github.com/styled-components/css-to-react-native/issues"
3636
},
3737
"homepage": "https://github.com/styled-components/css-to-react-native#readme",
38-
"jest": {
39-
"testURL": "http://localhost"
40-
},
4138
"devDependencies": {
4239
"@babel/cli": "^7.6.2",
40+
"@babel/core": "^7.1.0",
4341
"@babel/preset-env": "^7.6.2",
4442
"eslint": "^4.17.0",
4543
"eslint-config-airbnb-base": "^12.1.0",
4644
"eslint-config-prettier": "^2.9.0",
4745
"eslint-plugin-import": "^2.8.0",
4846
"eslint-plugin-prettier": "^2.6.0",
49-
"jest": "^24.9.0",
5047
"lint-staged": "^6.1.0",
5148
"prettier": "^1.18.2",
52-
"rollup": "^1.22.0"
49+
"rollup": "^1.22.0",
50+
"vitest": "^4.0.1"
5351
},
5452
"dependencies": {
5553
"camelize": "^1.0.0",

src/__tests__/aspectRatio.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { expect, it } from 'vitest'
2+
13
import transformCss from '..'
24

35
it('handles regular aspect ratio values', () => {

src/__tests__/border.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { expect, it } from 'vitest'
2+
13
import transformCss from '..'
24

35
it('transforms border none', () => {

src/__tests__/borderColor.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { expect, it } from 'vitest'
2+
13
import transformCss from '..'
24

35
it('transforms border color with multiple values', () => {

src/__tests__/boxModel.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { expect, it } from 'vitest'
2+
13
import transformCss from '..'
24

35
it('transforms margin, padding with 1 value', () => {

src/__tests__/boxShadow.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { expect, it } from 'vitest'
2+
13
import transformCss from '..'
24

35
it('transforms box-shadow into shadow- properties', () => {

src/__tests__/colors.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { expect, it } from 'vitest'
2+
13
import transformCss from '..'
24

35
it('transforms hex colors', () => {

src/__tests__/flex.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { expect, it } from 'vitest'
2+
13
import transformCss from '..'
24

35
it('transforms flex shorthand with 3 values', () => {

src/__tests__/flexFlow.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { expect, it } from 'vitest'
2+
13
import transformCss from '..'
24

35
it('transforms flexFlow shorthand with two values', () => {

0 commit comments

Comments
 (0)