Skip to content

Commit

Permalink
Update dependencies and replace ts-jest for @swc/jest (#46)
Browse files Browse the repository at this point in the history
* Update dependencies and replace ts-jest for @swc/jest

* Lint

* Add lock
  • Loading branch information
Imar Abreu authored Nov 15, 2023
1 parent 0c35b53 commit cf1e879
Show file tree
Hide file tree
Showing 9 changed files with 21,164 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
node-version: ${{ matrix.node }}

- name: Install Dependencies
run: npm install
run: npm ci

- name: Run Lint
run: npm run lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
node-version: ${{ matrix.node }}
registry-url: https://registry.npmjs.org
- name: Install Dependencies
run: npm install
run: npm ci

- name: Build
run: npm run build
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
npm-debug.log*
package-lock.json
node_modules
tokens/*
figma-tokens*
Expand Down
10 changes: 10 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"sourceMaps": true,

"jsc": {
"parser": {
"syntax": "typescript",
"tsx": false
}
}
}
4 changes: 3 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ const jestConfig = {
testMatch: ['<rootDir>/**/tests/**/*.test.{js,ts}'],
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{ts,js}'],
preset: 'ts-jest',
moduleDirectories: ['node_modules', '<rootDir>'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest']
}
};

Expand Down
Loading

3 comments on commit cf1e879

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.❔
Category Percentage Covered / Total
🟒 Statements 85.79% 513/598
🟑 Branches 65.75% 144/219
🟒 Functions 86.9% 146/168
🟒 Lines 85.36% 484/567

Test suite run success

91 tests passing in 4 suites.

Report generated by πŸ§ͺjest coverage report action from cf1e879

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.❔
Category Percentage Covered / Total
🟒 Statements 85.79% 513/598
🟑 Branches 65.75% 144/219
🟒 Functions 86.9% 146/168
🟒 Lines 85.36% 484/567

Test suite run success

91 tests passing in 4 suites.

Report generated by πŸ§ͺjest coverage report action from cf1e879

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.❔
Category Percentage Covered / Total
🟒 Statements 85.49% 542/634
🟑 Branches 64.81% 151/233
🟒 Functions 87.43% 153/175
🟒 Lines 85.07% 513/603

Test suite run success

91 tests passing in 4 suites.

Report generated by πŸ§ͺjest coverage report action from cf1e879

Please sign in to comment.