Skip to content

Commit

Permalink
Merge pull request #29 from tool-belt/jestToVitest
Browse files Browse the repository at this point in the history
migrated from jest to vitest
  • Loading branch information
ghalibansari authored Aug 18, 2023
2 parents ab5067c + 648a366 commit d01edd4
Show file tree
Hide file tree
Showing 15 changed files with 1,761 additions and 2,427 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ module.exports = {
},
rules: {
'sonarjs/cognitive-complexity': ['error', 20],
'jest/no-deprecated-functions': 'off',
},
};
64 changes: 32 additions & 32 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ "main", "gh-pages" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "57 23 * * 3"
push:
branches: ['main', 'gh-pages']
pull_request:
branches: ['main']
schedule:
- cron: '57 23 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ javascript ]
strategy:
fail-fast: false
matrix:
language: [javascript]

steps:
- name: Checkout
uses: actions/checkout@v3
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: '/language:${{ matrix.language }}'
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
name: Install pnpm
id: pnpm-install
with:
version: 7
version: 8
- name: Install Dependencies
run: pnpm install
- name: test
run: pnpm run test:coverage --ci
run: pnpm run test:coverage
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: Install pnpm
id: pnpm-install
with:
version: 7
version: 8
- name: Install Dependencies
run: pnpm install
- run: pnpm build
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This package is open to contributions. To contribute, please follow these steps:

1. Fork the upstream repository into a personal account and clone it.
2. Run `yarn install`.
2. Run `pnpm install`.
3. Make your changes - please make sure to add tests if needed.
4. Push your branch to your fork.
5. Create a pull request with an explanation of your changes. Please link to any pertinent issue.
5 changes: 0 additions & 5 deletions jest.config.ts

This file was deleted.

16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,32 @@
"dist/"
],
"scripts": {
"preinstall": "npx only-allow pnpm",
"clean": "rimraf dist",
"clean:nodemodules": "rimraf node_modules",
"build": "rimraf dist && tsc -p ./tsconfig.build.json",
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate",
"format": "prettier --write '**/*.{js,md,json,yaml,yml}'",
"lint": "eslint --fix '**/*.ts'",
"prepare": "husky install",
"test": "jest",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch"
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest"
},
"devDependencies": {
"@tool-belt/eslint-config": "^1.3.3",
"@types/jest": "^29.2.4",
"@types/node": "^18.11.11",
"@vitest/coverage-istanbul": "^0.34.2",
"all-contributors-cli": "^6.24.0",
"eslint": "^8.29.0",
"husky": "^8.0.2",
"jest": "^29.3.1",
"lint-staged": "^13.1.0",
"prettier": "^2.8.1",
"rimraf": "^3.0.2",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
"typescript": "^4.9.5",
"vitest": "^0.34.2"
},
"lint-staged": {
"*.ts": "eslint --fix",
Expand Down
Loading

0 comments on commit d01edd4

Please sign in to comment.