Skip to content

Commit

Permalink
Merge pull request #207 from timolins/improved-height-measurement
Browse files Browse the repository at this point in the history
Add dynamic height state (+ add test setup)
  • Loading branch information
timolins authored Aug 21, 2022
2 parents ee483cc + 05b1954 commit 28194c5
Show file tree
Hide file tree
Showing 15 changed files with 3,552 additions and 492 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on: [push]
jobs:
build:
name: Build
name: Build & test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -18,3 +18,5 @@ jobs:
run: pnpm install
- name: Build package
run: pnpm build
- name: Test
run: pnpm run test --ci --coverage
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.DS_Store
node_modules
.cache
coverage
dist
/headless
.vscode
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/test/setup.ts'],
};
19 changes: 15 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"scripts": {
"start": "tsup --watch",
"build": "tsup",
"test": "echo \"No test specified\"",
"test": "jest --runInBand",
"setup": "pnpm i && cd site && pnpm i && cd .. && pnpm run link",
"link": "pnpm link ./site/node_modules/react && pnpm link ./site/node_modules/react-dom",
"size": "size-limit"
Expand Down Expand Up @@ -73,12 +73,23 @@
}
],
"devDependencies": {
"@jest/types": "^28.1.3",
"@size-limit/preset-small-lib": "^7.0.8",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"csstype": "^3.0.7",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@types/jest": "^28.1.5",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@types/testing-library__jest-dom": "^5.14.5",
"csstype": "^3.1.0",
"jest": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"prettier": "^2.7.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"size-limit": "^7.0.8",
"ts-jest": "^28.0.6",
"tslib": "^2.4.0",
"tsup": "^6.1.3",
"typescript": "^4.7.4"
},
Expand Down
Loading

1 comment on commit 28194c5

@vercel
Copy link

@vercel vercel bot commented on 28194c5 Aug 21, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.