Skip to content

Commit

Permalink
feat(typography): add text component
Browse files Browse the repository at this point in the history
  • Loading branch information
jack0pan committed Sep 2, 2021
1 parent 5a1466b commit 4ee91a3
Show file tree
Hide file tree
Showing 17 changed files with 706 additions and 297 deletions.
34 changes: 0 additions & 34 deletions enzyme-adapter.js

This file was deleted.

5 changes: 5 additions & 0 deletions jest-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import '@testing-library/jest-dom';
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });
10 changes: 8 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
module.exports = {
// if you're also using typescript
preset: 'ts-jest',
testEnvironment: 'node',
testEnvironment: 'jsdom',
testEnvironmentOptions: {
enzymeAdapter: 'react16',
},
verbose: true,
// registers babel.config.js with jest
transform: {
Expand All @@ -14,7 +17,8 @@ module.exports = {
// transformIgnorePatterns: ['node_modules/?!(@gio-design\/icon)', '!(@gio-design/icon)'],
transformIgnorePatterns: ['node_modules/@storybook/(?!(addon-docs)/)'],

setupFilesAfterEnv: ['<rootDir>/enzyme-adapter.js'],
// setupFilesAfterEnv: ['<rootDir>/enzyme-adapter.js'],
setupFilesAfterEnv: ['<rootDir>/jest-setup'],

moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
Expand All @@ -30,6 +34,8 @@ module.exports = {
'!src/**/*.stories.{ts,tsx}',
'!src/**/demos/*',
'!src/**/__test?(s)__/*',
'!src/text/Text.tsx',
'!src/typograhy/Text.tsx',
],
coverageDirectory: './coverage/',
coveragePathIgnorePatterns: ['list-pro/'],
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"rc-virtual-list": "^3.2.6",
"react-dnd": "^11.1.3",
"react-dnd-html5-backend": "^14.0.0",
"react-lines-ellipsis": "^0.15.0",
"react-truncate": "^2.4.0",
"react-use": "^15.3.3",
"react-virtualized": "^9.22.2",
Expand Down Expand Up @@ -96,6 +97,7 @@
"@storybook/api": "^6.3.7",
"@storybook/node-logger": "^6.3.7",
"@storybook/react": "^6.3.7",
"@testing-library/jest-dom": "^5.12.0",
"@testing-library/react": "^11.0.4",
"@testing-library/react-hooks": "7.0.1",
"@types/classnames": "^2.2.9",
Expand Down Expand Up @@ -163,4 +165,4 @@
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}
Loading

1 comment on commit 4ee91a3

@vercel
Copy link

@vercel vercel bot commented on 4ee91a3 Sep 2, 2021

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.