Skip to content

Commit a510c71

Browse files
committed
fix: postcss integration is not working
1 parent 9addb7e commit a510c71

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

jest.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module.exports = {
22
preset: 'ts-jest',
33
testEnvironment: 'jsdom',
44
testPathIgnorePatterns: ['example', 'node_modules'],
5-
setupFiles: ['@testing-library/react/dont-cleanup-after-each'],
65
moduleNameMapper: {
76
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
87
'<rootDir>/__mocks__/fileMock.js',
File renamed without changes.

src/__tests__/index.test.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import '@testing-library/jest-dom';
33
import Main from '../index';
44

55
describe('My Component', () => {
6-
it('renders displays the passed message', async () => {
6+
it('displays the passed message', async () => {
77
const { findByText } = render(<Main message="Hello World" />);
88
const content = await findByText('Hello World');
99
expect(content).toBeTruthy();
1010
});
11-
it('renders displays the default message', async () => {
11+
it('displays the default message', async () => {
1212
const { findByText } = render(<Main />);
1313
const content = await findByText('No Message');
1414
expect(content).toBeTruthy();

tools/init.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/* eslint-disable @typescript-eslint/no-var-requires */
1313
/* eslint-disable @typescript-eslint/no-explicit-any */
1414

15+
// eslint-disable-next-line dot-notation
1516
if (process.env['RTL_SKIP_POSTINSTALL']) {
1617
console.log('Skipping post-install process...');
1718
process.exit(0);

tsconfig.json

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"module": "ES6",
4+
"module": "ESNext",
55
"lib": [
66
"ES2017",
77
"ES7",
@@ -10,6 +10,8 @@
1010
],
1111
"declaration": true,
1212
"declarationDir": "dist",
13+
"declarationMap": true,
14+
"downlevelIteration": false,
1315
"outDir": "dist",
1416
"sourceMap": true,
1517
"strict": true,
@@ -22,20 +24,22 @@
2224
"resolveJsonModule": true,
2325
"jsx": "react-jsx",
2426
"baseUrl": "./src",
27+
"paths": {
28+
"tslib": [
29+
"node_modules/tslib/tslib.d.ts"
30+
]
31+
},
2532
"plugins": [
2633
{
2734
"name": "typescript-plugin-css-modules"
2835
}
2936
],
3037
},
3138
"include": [
32-
"src/**/*",
33-
"Globals.d.ts"
39+
"src/**/*"
3440
],
3541
"exclude": [
3642
"node_modules",
3743
"dist",
38-
"src/**/*.spec.tsx",
39-
"src/**/*.test.tsx"
4044
]
4145
}

0 commit comments

Comments
 (0)