Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cli): switch to vitest #9863

Merged
merged 79 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
7487477
Initial vitest setup
Josh-Walker-GM Jan 20, 2024
cf2e150
build.test.js
Josh-Walker-GM Jan 20, 2024
cdc3c43
dev.test.js
Josh-Walker-GM Jan 20, 2024
86a04b3
prisma.test.js
Josh-Walker-GM Jan 20, 2024
4738c75
serve.test.js
Josh-Walker-GM Jan 20, 2024
c5f9a0a
test.test.js
Josh-Walker-GM Jan 20, 2024
1e2c394
type-check.test.js
Josh-Walker-GM Jan 20, 2024
6972ec9
getDevNodeOptions
Josh-Walker-GM Jan 20, 2024
b69c01c
updateCheck
Josh-Walker-GM Jan 20, 2024
2020a8d
schemaHelpers
Josh-Walker-GM Jan 20, 2024
c3d93c0
rwPluralize
Josh-Walker-GM Jan 20, 2024
26abf6f
rollback
Josh-Walker-GM Jan 20, 2024
3df517d
pluralHelpers
Josh-Walker-GM Jan 20, 2024
127754b
mergeSemantics
Josh-Walker-GM Jan 20, 2024
e2ba6b3
locking
Josh-Walker-GM Jan 20, 2024
f03fe37
index
Josh-Walker-GM Jan 20, 2024
9a3eb6d
update serve.test.js
Josh-Walker-GM Jan 20, 2024
68060d9
workspace update
Josh-Walker-GM Jan 21, 2024
b110300
plugin.test.js
Josh-Walker-GM Jan 21, 2024
e4e43a0
destroy service.test.js
Josh-Walker-GM Jan 21, 2024
0c6015f
destroy cell.test.js
Josh-Walker-GM Jan 21, 2024
70e21ac
destroy component.test.js
Josh-Walker-GM Jan 21, 2024
f05729d
destroy directive.test.js
Josh-Walker-GM Jan 21, 2024
66fe43f
destroy function.test.js
Josh-Walker-GM Jan 21, 2024
102767d
destory layout.test.js
Josh-Walker-GM Jan 21, 2024
636361c
destory page.test.js
Josh-Walker-GM Jan 21, 2024
101834e
destory sdl
Josh-Walker-GM Jan 21, 2024
09802c3
WIP destory scaffold
Josh-Walker-GM Jan 21, 2024
5d008bc
exp docker
Josh-Walker-GM Jan 21, 2024
05e4a84
generate service
Josh-Walker-GM Jan 21, 2024
6c10234
gen secret
Josh-Walker-GM Jan 21, 2024
8cdc286
mergeBasics and mergeConfig
Josh-Walker-GM Jan 21, 2024
7abb5a4
remove fs.test.js
Josh-Walker-GM Jan 21, 2024
03b7a5c
deploy baremetal.test.js
Josh-Walker-GM Jan 21, 2024
06e89b4
deploy nftPack.test.js
Josh-Walker-GM Jan 21, 2024
6419b80
fix: consistent snapshot prettier settings
Josh-Walker-GM Jan 21, 2024
000e3d7
generate cell
Josh-Walker-GM Jan 21, 2024
70cfa20
generate component
Josh-Walker-GM Jan 21, 2024
01411eb
generate dataMigration
Josh-Walker-GM Jan 21, 2024
9d4cb92
generate directive
Josh-Walker-GM Jan 21, 2024
13fee27
gen function
Josh-Walker-GM Jan 21, 2024
a486954
gen layout
Josh-Walker-GM Jan 21, 2024
6bdb2c6
gen script
Josh-Walker-GM Jan 21, 2024
5d28e86
WIP gen sdl
Josh-Walker-GM Jan 21, 2024
77ca9ca
WIP gen page
Josh-Walker-GM Jan 21, 2024
24b48c5
gen service
Josh-Walker-GM Jan 21, 2024
f3e0180
gen scaffold
Josh-Walker-GM Jan 21, 2024
f5f68ef
WIP scaffold skips
Josh-Walker-GM Jan 21, 2024
51a9d05
gen __tests__
Josh-Walker-GM Jan 21, 2024
021f22f
workspace update
Josh-Walker-GM Jan 21, 2024
4a671ab
WIP setup trustedDocuments
Josh-Walker-GM Jan 21, 2024
4655a40
setup graphiql
Josh-Walker-GM Jan 21, 2024
80ec6d6
WIP setup deploy netlify
Josh-Walker-GM Jan 21, 2024
645f651
WIP gen dbAuth
Josh-Walker-GM Jan 21, 2024
534b782
WIP setup package
Josh-Walker-GM Jan 21, 2024
6c44ee2
WIP skip graphql features
Josh-Walker-GM Jan 21, 2024
a9e5dc7
initial working codemod tests
Josh-Walker-GM Jan 21, 2024
c8277a2
uncomments
Josh-Walker-GM Jan 21, 2024
7a80829
fix gen page and sdl
Josh-Walker-GM Jan 21, 2024
12ebe00
fix destory scaffold
Josh-Walker-GM Jan 21, 2024
6859fd1
reenable dbauth tests
Josh-Walker-GM Jan 21, 2024
f109873
fix setup deploy __tests__
Josh-Walker-GM Jan 21, 2024
7d74551
restore missing snapshot within test
Josh-Walker-GM Jan 21, 2024
e1dc9a0
fix setup package
Josh-Walker-GM Jan 21, 2024
66c8696
Merge branch 'main' into jgmw-chore/cli-vitest
Josh-Walker-GM Jan 22, 2024
d735fbc
fix comment
Josh-Walker-GM Jan 22, 2024
59c2852
remove importOriginal parameter
Josh-Walker-GM Jan 22, 2024
43aabd8
remove unneeded mockClear
Josh-Walker-GM Jan 22, 2024
77d880a
clean comments in netlify test
Josh-Walker-GM Jan 22, 2024
b55bee2
reduce repeated fs-extra mocking
Josh-Walker-GM Jan 22, 2024
d69a239
avoid 'mod' name
Josh-Walker-GM Jan 22, 2024
f38caf4
remove jest dep
Josh-Walker-GM Jan 22, 2024
0366f15
remove unused mock
Josh-Walker-GM Jan 22, 2024
24eb890
fix dbAuth gen tests
Josh-Walker-GM Jan 22, 2024
14ab2f2
Merge branch 'main' into jgmw-chore/cli-vitest
jtoar Jan 23, 2024
0476e41
unskip remaining
Josh-Walker-GM Jan 24, 2024
6991505
Merge remote-tracking branch 'origin/main' into jgmw-chore/cli-vitest
Josh-Walker-GM Jan 24, 2024
9a6fd6f
convert studio test
Josh-Walker-GM Jan 24, 2024
a5a580a
get remaining test passing
Josh-Walker-GM Jan 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions packages/cli/__mocks__/@vercel/nft.js

This file was deleted.

39 changes: 0 additions & 39 deletions packages/cli/jest.config.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/cli/jest.setup.js

This file was deleted.

8 changes: 5 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"dev": "RWJS_CWD=../../__fixtures__/example-todo-main node dist/index.js",
"fix:permissions": "chmod +x dist/index.js dist/rwfw.js",
"prepublishOnly": "yarn build",
"test": "jest",
"test:watch": "yarn test --watch"
"test": "vitest run",
"test:watch": "vitest watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.23.6",
Expand Down Expand Up @@ -88,7 +88,9 @@
"@babel/core": "^7.22.20",
"@types/archiver": "^6",
"jest": "29.7.0",
"typescript": "5.3.3"
"memfs": "4.6.0",
"typescript": "5.3.3",
"vitest": "1.2.1"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
36 changes: 18 additions & 18 deletions packages/cli/src/__tests__/__snapshots__/plugin.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`plugin loading correct loading for @redwoodjs namespace help ('') 1`] = `
exports[`plugin loading > correct loading for @redwoodjs namespace help ('') 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -41,7 +41,7 @@ exports[`plugin loading correct loading for @redwoodjs namespace help ('') 1`] =
]
`;

exports[`plugin loading correct loading for @redwoodjs namespace help ('--help') 1`] = `
exports[`plugin loading > correct loading for @redwoodjs namespace help ('--help') 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -82,7 +82,7 @@ exports[`plugin loading correct loading for @redwoodjs namespace help ('--help')
]
`;

exports[`plugin loading correct loading for @redwoodjs namespace help ('-h') 1`] = `
exports[`plugin loading > correct loading for @redwoodjs namespace help ('-h') 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -123,7 +123,7 @@ exports[`plugin loading correct loading for @redwoodjs namespace help ('-h') 1`]
]
`;

exports[`plugin loading correct loading for known redwood command (with cache) 1`] = `
exports[`plugin loading > correct loading for known redwood command (with cache) 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -152,7 +152,7 @@ exports[`plugin loading correct loading for known redwood command (with cache) 1
]
`;

exports[`plugin loading correct loading for known redwood command (without cache) 1`] = `
exports[`plugin loading > correct loading for known redwood command (without cache) 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -181,7 +181,7 @@ exports[`plugin loading correct loading for known redwood command (without cache
]
`;

exports[`plugin loading correct loading for known third party command (with cache) 1`] = `
exports[`plugin loading > correct loading for known third party command (with cache) 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -210,7 +210,7 @@ exports[`plugin loading correct loading for known third party command (with cach
]
`;

exports[`plugin loading correct loading for known third party command (without cache) 1`] = `
exports[`plugin loading > correct loading for known third party command (without cache) 1`] = `
[
[
"@bluewoodjs/cli-some-package",
Expand Down Expand Up @@ -239,7 +239,7 @@ exports[`plugin loading correct loading for known third party command (without c
]
`;

exports[`plugin loading correct loading for root help ('') 1`] = `
exports[`plugin loading > correct loading for root help ('') 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -280,7 +280,7 @@ exports[`plugin loading correct loading for root help ('') 1`] = `
]
`;

exports[`plugin loading correct loading for root help ('--help') 1`] = `
exports[`plugin loading > correct loading for root help ('--help') 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -321,7 +321,7 @@ exports[`plugin loading correct loading for root help ('--help') 1`] = `
]
`;

exports[`plugin loading correct loading for root help ('-h') 1`] = `
exports[`plugin loading > correct loading for root help ('-h') 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -362,7 +362,7 @@ exports[`plugin loading correct loading for root help ('-h') 1`] = `
]
`;

exports[`plugin loading correct loading for third party namespace help ('') 1`] = `
exports[`plugin loading > correct loading for third party namespace help ('') 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -391,7 +391,7 @@ exports[`plugin loading correct loading for third party namespace help ('') 1`]
]
`;

exports[`plugin loading correct loading for third party namespace help ('--help') 1`] = `
exports[`plugin loading > correct loading for third party namespace help ('--help') 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -420,7 +420,7 @@ exports[`plugin loading correct loading for third party namespace help ('--help'
]
`;

exports[`plugin loading correct loading for third party namespace help ('-h') 1`] = `
exports[`plugin loading > correct loading for third party namespace help ('-h') 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -449,7 +449,7 @@ exports[`plugin loading correct loading for third party namespace help ('-h') 1`
]
`;

exports[`plugin loading correct loading for unknown namespace (no command) 1`] = `
exports[`plugin loading > correct loading for unknown namespace (no command) 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -490,7 +490,7 @@ exports[`plugin loading correct loading for unknown namespace (no command) 1`] =
]
`;

exports[`plugin loading correct loading for unknown namespace (with command) 1`] = `
exports[`plugin loading > correct loading for unknown namespace (with command) 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -531,7 +531,7 @@ exports[`plugin loading correct loading for unknown namespace (with command) 1`]
]
`;

exports[`plugin loading correct loading for unknown redwood command 1`] = `
exports[`plugin loading > correct loading for unknown redwood command 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down Expand Up @@ -572,7 +572,7 @@ exports[`plugin loading correct loading for unknown redwood command 1`] = `
]
`;

exports[`plugin loading correct loading for unknown third party command 1`] = `
exports[`plugin loading > correct loading for unknown third party command 1`] = `
[
[
"@redwoodjs/cli-some-package",
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/__tests__/cwd.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { spawnSync } from 'child_process'
import path from 'path'

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

describe('The CLI sets `cwd` correctly', () => {
describe('--cwd', () => {
it('lets the user set the cwd via the `--cwd` option', async () => {
Expand Down
140 changes: 0 additions & 140 deletions packages/cli/src/__tests__/fs.test.js

This file was deleted.

Loading
Loading