Skip to content

Commit

Permalink
chore(structure): switch to vitest (redwoodjs#9878)
Browse files Browse the repository at this point in the history
Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com>
  • Loading branch information
Josh-Walker-GM and Tobbe authored Jan 25, 2024
1 parent 1b9ebd5 commit c29019c
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 11 deletions.
14 changes: 4 additions & 10 deletions packages/structure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@
"build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx\" --ignore dist --exec \"yarn build\"",
"prepublishOnly": "NODE_ENV=production yarn build",
"prettier": "prettier --write './src/**/*.{ts,tsx}'",
"test": "jest src",
"test:watch": "yarn test --watch"
},
"jest": {
"testPathIgnorePatterns": [
"/fixtures/",
"/dist/"
]
"test": "vitest run",
"test:watch": "vitest watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.23.6",
Expand Down Expand Up @@ -63,8 +57,8 @@
"@types/lru-cache": "7.10.10",
"@types/node": "20.10.4",
"@types/vscode": "1.79.1",
"jest": "29.7.0",
"typescript": "5.3.3"
"typescript": "5.3.3",
"vitest": "1.2.1"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
2 changes: 2 additions & 0 deletions packages/structure/src/model/__tests__/model.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { basename, resolve } from 'path'

import { describe, it, expect } from 'vitest'

import { DefaultHost } from '../../hosts'
import { URL_file } from '../../x/URL'
import { RWProject } from '../RWProject'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { describe, test } from 'vitest'

import { advanced_path_parser } from '../advanced_path_parser'

describe('advanced_path_parser', () => {
test('it works', () => {
const route = '/foo/{param1}/bar/{baz:Int}/x'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { resolve, join } from 'path'

import { describe, test, expect } from 'vitest'

import { process_env_findInFile, process_env_findAll } from '../process_env'

describe('process_env_findInFile', () => {
Expand Down
2 changes: 2 additions & 0 deletions packages/structure/src/outline/__tests__/outline.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { resolve } from 'path'

import { describe, it } from 'vitest'

import { DefaultHost } from '../../hosts'
import { RWProject } from '../../model'
import { getOutline } from '../outline'
Expand Down
2 changes: 2 additions & 0 deletions packages/structure/src/x/__tests__/URL.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { sep } from 'path'

import { describe, it, expect } from 'vitest'

import { URL_file, URL_toFile } from '../URL'

describe('URL_fromFile', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/structure/src/x/__tests__/prisma.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, expect } from 'vitest'
import { Range } from 'vscode-languageserver'

import { prisma_parseEnvExpressions } from '../prisma'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, expect, test } from 'vitest'
import {
DiagnosticSeverity,
Position,
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8715,7 +8715,6 @@ __metadata:
enquirer: "npm:2.4.1"
fast-glob: "npm:3.3.2"
graphql: "npm:16.8.1"
jest: "npm:29.7.0"
lazy-get-decorator: "npm:2.2.1"
line-column: "npm:1.0.2"
lodash: "npm:4.17.21"
Expand All @@ -8724,6 +8723,7 @@ __metadata:
proxyquire: "npm:2.1.3"
ts-morph: "npm:15.1.0"
typescript: "npm:5.3.3"
vitest: "npm:1.2.1"
vscode-languageserver: "npm:6.1.1"
vscode-languageserver-textdocument: "npm:1.0.8"
vscode-languageserver-types: "npm:3.17.3"
Expand Down

0 comments on commit c29019c

Please sign in to comment.