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

Migrate from jest to vitest (wip) #92

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
48acce5
chore(deps): install vitest
ayushmanchhabra Jun 22, 2024
b18f5b6
chore(ci): upgrade github actions
ayushmanchhabra Jun 22, 2024
1b69e1e
chore(ci): use Node v18.7.0
ayushmanchhabra Jun 22, 2024
123c37f
fix(ci): resolve syntax error
ayushmanchhabra Jun 22, 2024
237f8b8
chore: use Node v18.20.3
ayushmanchhabra Jun 22, 2024
3682301
chore(test): migrate tests from jest to vitest
ayushmanchhabra Jun 22, 2024
7fcf412
chore(ci): use volta action to get old node versions
ayushmanchhabra Jun 22, 2024
ce4703e
chore(test): port jest mocks to vitest
ayushmanchhabra Jun 22, 2024
d650af5
chore(ci): pin node versions using volta
ayushmanchhabra Jun 22, 2024
80ddf84
fix(ci): resolve syntax error
ayushmanchhabra Jun 22, 2024
63d96cf
chore(ci): cancel in progress jobs
ayushmanchhabra Jun 22, 2024
ba038db
fix(ci): resolve syntax error
ayushmanchhabra Jun 22, 2024
374456d
chore(ci): add back some deleted config
ayushmanchhabra Jun 22, 2024
fe9c552
chore(ci): node 18.20.3 -> 18.x
ayushmanchhabra Jun 22, 2024
ff48fdd
fix(ci): npm -v on Node 18 only
ayushmanchhabra Jun 22, 2024
4e83e86
chore(ci): node 8 -> 8.3.0
ayushmanchhabra Jun 22, 2024
8186509
chore(eslint): add back tjw-jest
ayushmanchhabra Jun 23, 2024
4df6457
chore(vite): remove timeout config
ayushmanchhabra Jun 23, 2024
294439d
chore(vitest): enable global apis
ayushmanchhabra Jun 23, 2024
f10dcd8
chore(jest): remove jest workaround comment
ayushmanchhabra Jun 23, 2024
62957ef
chore: revert to original module import style
ayushmanchhabra Jun 23, 2024
91c9bbd
Merge branch 'dev-82' of github.com:nwutils/create-desktop-shortcuts …
ayushmanchhabra Jun 23, 2024
2f480e5
chore(ci): volta pin npm version for Node 8
ayushmanchhabra Jun 23, 2024
95b962a
chore(vitest): mock some node modules
ayushmanchhabra Jun 23, 2024
2fc245f
chore(vitest): misc changes
ayushmanchhabra Jun 23, 2024
6f7300c
chore(deps): update lock file
ayushmanchhabra Jun 23, 2024
b17cf2e
chore(vitest): mock node:os
ayushmanchhabra Jun 25, 2024
ddda8da
chore(test): helper test suite passes
ayushmanchhabra Jun 25, 2024
8e05557
chore(test): jest -> vi
ayushmanchhabra Jun 25, 2024
68f490d
Merge branch 'dev-82' of github.com:nwutils/create-desktop-shortcuts …
ayushmanchhabra Jun 25, 2024
969fdf9
Merge branch 'main' into dev-82
ayushmanchhabra Jun 25, 2024
8d9e777
chore: revert some things
ayushmanchhabra Aug 11, 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
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module.exports = {
env: {
es6: true,
node: true,
jest: true
},
extends: [
'tjw-base',
ayushmanchhabra marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
27 changes: 16 additions & 11 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build Status

on:
Expand All @@ -9,6 +6,10 @@ on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build:

Expand All @@ -18,18 +19,23 @@ jobs:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
node-version: [8.3.0, 18.x]

ayushmanchhabra marked this conversation as resolved.
Show resolved Hide resolved
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Checkout repository
uses: actions/[email protected]
- name: Setup Node
uses: volta-cli/[email protected]
- name: Switch Node version
run: volta pin node@${{ matrix.node-version }}
- name: Node.js version
run: node -v
- if: ${{ matrix.node-version == '18.x' }}
run: npm -v

# Node 8.3.0 comes with npm 5.3.0.
# npm 5.7.1 is the first version to support npm ci
- if: ${{ matrix.node-version != '18.x' }}
run: npm install -g [email protected]
run: volta pin [email protected]

- run: npm install
- run: npm run e2e
Expand All @@ -41,4 +47,3 @@ jobs:
# ESLint 7+ uses `} catch {` which isn't supported in Node 8
- if: ${{ matrix.node-version == '18.x' }}
run: npm run lint

17 changes: 0 additions & 17 deletions jest.config.js

This file was deleted.

Loading
Loading