-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
1,189 additions
and
25,300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "current" | ||
}, | ||
"modules": "commonjs", | ||
"debug": false | ||
}, | ||
"@babel/preset-react" | ||
] | ||
], | ||
"plugins": ["@babel/plugin-proposal-class-properties"], | ||
"env": { | ||
"test": { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": "commonjs", | ||
"debug": false | ||
} | ||
], | ||
"@babel/preset-react" | ||
], | ||
"plugins": ["@babel/plugin-syntax-dynamic-import", "@babel/plugin-proposal-class-properties"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[{*.js,*.json,*.yml}] | ||
indent_size = 2 | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ | |
# 2021.9.03 | ||
|
||
+ 切换相关依赖 | ||
+ 增加react组件调试能力 | ||
+ 增加react组件调试能力 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const verifyBoolean = true; | ||
export const verifyArray = []; | ||
export const verifyObject = {}; | ||
export const verifyError = new Error('message'); | ||
export const verifyXmlhttp = new XMLHttpRequest(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { isObject, isError, isXMLHttpRequest } from '@/utils/shared'; | ||
import { | ||
verifyBoolean, | ||
verifyArray, | ||
verifyObject, | ||
verifyError, | ||
verifyXmlhttp | ||
} from '../../__mocks__'; | ||
|
||
describe('utils/shared module', () => { | ||
test('shared/isObject', () => { | ||
expect(isObject(verifyBoolean)).toBe(false); | ||
expect(isObject(verifyArray)).toBe(false); | ||
expect(isObject(verifyObject)).toBe(true); | ||
}); | ||
|
||
test('shared/isError', () => { | ||
expect(isError(verifyError)).toBe(true); | ||
expect(isError(verifyXmlhttp)).toBe(false); | ||
}); | ||
|
||
test('shared/isXMLHttpRequest', () => { | ||
expect(isXMLHttpRequest(verifyError)).toBe(false); | ||
expect(isXMLHttpRequest(verifyArray)).toBe(false); | ||
expect(isXMLHttpRequest(verifyXmlhttp)).toBe(true); | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict'; | ||
|
||
const babelJest = require('babel-jest'); | ||
|
||
module.exports = babelJest.createTransformer({ | ||
presets: [require.resolve('babel-preset-react-app')], | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
const loader = require('graphql-tag/loader'); | ||
|
||
module.exports = { | ||
process(src) { | ||
return loader.call({ cacheable() {} }, src); | ||
}, | ||
}; |
Empty file.
Oops, something went wrong.