Yuki Takei 3 years ago
parent
commit
85bc75a906

+ 1 - 0
packages/core/jest.config.js

@@ -10,6 +10,7 @@ module.exports = {
   transform: {
   transform: {
     '^.+\\.(js|jsx|ts|tsx)$': '@swc/jest',
     '^.+\\.(js|jsx|ts|tsx)$': '@swc/jest',
   },
   },
+  transformIgnorePatterns: [],
 
 
   moduleNameMapper: MODULE_NAME_MAPPING,
   moduleNameMapper: MODULE_NAME_MAPPING,
 
 

+ 10 - 0
packages/core/test/tsconfig.json

@@ -0,0 +1,10 @@
+{
+  "$schema": "http://json.schemastore.org/tsconfig",
+  "extends": "../tsconfig.json",
+  "compilerOptions": {
+    "baseUrl": ".",
+    "paths": {
+      "~/*": ["./src/*"]
+    }
+  }
+}

+ 8 - 8
packages/core/test/util/env-utils.test.js

@@ -1,20 +1,20 @@
-import envUtils from '~/utils/env-utils';
+import { toBoolean } from '~/utils/env-utils';
 
 
 
 
 describe('env-utils', () => {
 describe('env-utils', () => {
   describe('.toBoolean', () => {
   describe('.toBoolean', () => {
 
 
     test('should convert to true', () => {
     test('should convert to true', () => {
-      expect(envUtils.toBoolean('true')).toBe(true);
-      expect(envUtils.toBoolean('True')).toBe(true);
-      expect(envUtils.toBoolean(1)).toBe(true);
+      expect(toBoolean('true')).toBe(true);
+      expect(toBoolean('True')).toBe(true);
+      expect(toBoolean(1)).toBe(true);
     });
     });
 
 
     test('should convert to false', () => {
     test('should convert to false', () => {
-      expect(envUtils.toBoolean(undefined)).toBe(false);
-      expect(envUtils.toBoolean(null)).toBe(false);
-      expect(envUtils.toBoolean('false')).toBe(false);
-      expect(envUtils.toBoolean(0)).toBe(false);
+      expect(toBoolean(undefined)).toBe(false);
+      expect(toBoolean(null)).toBe(false);
+      expect(toBoolean('false')).toBe(false);
+      expect(toBoolean(0)).toBe(false);
     });
     });
 
 
   });
   });

+ 1 - 4
packages/core/tsconfig.json

@@ -2,10 +2,7 @@
   "$schema": "http://json.schemastore.org/tsconfig",
   "$schema": "http://json.schemastore.org/tsconfig",
   "extends": "../../tsconfig.base.json",
   "extends": "../../tsconfig.base.json",
   "compilerOptions": {
   "compilerOptions": {
-    "baseUrl": ".",
-    "paths": {
-      "~/*": ["./src/*"]
-    }
+    "baseUrl": "."
   },
   },
   "include": [
   "include": [
     "src"
     "src"