Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tonai committed Nov 17, 2023
1 parent 7ab5e07 commit 0890769
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 16 deletions.
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"husky": "^8.0.3",
"http-server": "^14.1.1",
"lint-staged": "^14.0.1",
"prettier": "^3.0.3",
"prettier": "3.1.0",
"storybook": "^7.4.1",
"turbo": "^1.10.13",
"typescript": "^5.2.2",
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-custom/next.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ module.exports = {
extends: ['turbo', 'plugin:smile/next'],
rules: {
'@typescript-eslint/ban-types': ['error', { types: { Object: false } }],
'require-await': 'off',
},
};
8 changes: 6 additions & 2 deletions packages/react-front-kit-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"storybook-utils": ["dist/storybook-utils/index.d.ts"],
"test-utils": ["dist/test-utils/index.d.ts"]
"storybook-utils": [
"dist/storybook-utils/index.d.ts"
],
"test-utils": [
"dist/test-utils/index.d.ts"
]
}
},
"files": [
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/react-front-kit/src/helpers/typeGuard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export type IGuardedType<T extends IPrimitiveOrConstructor> = T extends new (
) => infer U
? U
: T extends keyof ITypeMap
? ITypeMap[T]
: never;
? ITypeMap[T]
: never;

export function typeGuard<T extends IPrimitiveOrConstructor>(
o: unknown,
Expand Down
7 changes: 5 additions & 2 deletions packages/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
"publishConfig": {
"access": "public"
},
"main": "./dist/index.js",
"module": "./src/index.ts",
"exports": {
".": "./dist/index.js",
"./fileMock": "./dist/fileMock.js",
"./setupTests": "./dist/setupTests.js"
},
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc --project tsconfig.build.json"
Expand Down
4 changes: 2 additions & 2 deletions packages/test/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default as babelConfig } from './babel.config';
export { default as jestConfig } from './jest.config';
export { default as babelConfig } from './babel.config.js';
export { default as jestConfig } from './jest.config.js';
6 changes: 3 additions & 3 deletions packages/test/src/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import type { Config } from 'jest';

const config: Config = {
moduleNameMapper: {
'\\.(css|less)$': 'test/src/fileMock.ts',
'\\.(css|less)$': 'test/fileMock',
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'test/src/fileMock.ts',
'test/fileMock',
},
roots: ['src'],
setupFilesAfterEnv: ['test/setupTests.ts'],
setupFilesAfterEnv: ['test/setupTests'],
testEnvironment: 'jsdom',
transformIgnorePatterns: ['/node_modules/(?!(pretty-bytes)/)'],
};
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/test/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "tsconfig/react-library.json",
"compilerOptions": {
"module": "Node16",
"module": "node16",
"moduleResolution": "node16",
"outDir": "dist"
},
Expand Down

0 comments on commit 0890769

Please sign in to comment.