-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
191 changed files
with
40,244 additions
and
35 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"presets": ["react-native"], | ||
"plugins": [["import", { "libraryName": "antd-mobile", "libraryDirectory": "components" }]] | ||
"plugins": [["import", { "libraryName": "antd-mobile", "libraryDirectory": "../../../../components" }]] | ||
} |
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 |
---|---|---|
|
@@ -44,3 +44,4 @@ my-release-key.keystore | |
yarn.lock | ||
npm-debug.log* | ||
!components/**/__tests__/*.js | ||
coverage |
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,33 @@ | ||
{ | ||
"preset": "react-native", | ||
"setupFiles": [ | ||
"./tests/setup.js" | ||
], | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"md" | ||
], | ||
"moduleNameMapper": { | ||
"\\.png": "<rootDir>/tests/imageStub.js" | ||
}, | ||
"testPathIgnorePatterns": [ | ||
"/node_modules/", | ||
"_site", | ||
"site" | ||
], | ||
"transform": { | ||
"\\.tsx?$": "./node_modules/typescript-babel-jest", | ||
"\\.js$": "./node_modules/babel-jest", | ||
"\\.md$": "./node_modules/antd-demo-jest/mobile" | ||
}, | ||
"testRegex": ".*\\.test\\.js$", | ||
"collectCoverageFrom": [ | ||
"components/**/*.{ts,tsx}", | ||
"!components/*/style/index.tsx" | ||
], | ||
"testEnvironment": "jsdom" | ||
} |
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 @@ | ||
{ | ||
"moduleFileExtensions": [ | ||
"web.tsx", | ||
"web.js", | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"md" | ||
], | ||
"moduleNameMapper": { | ||
"\\.svg$": "<rootDir>/tests/imageStub.js" | ||
}, | ||
"testPathIgnorePatterns": [ | ||
"/node_modules/", | ||
"_site", | ||
"site" | ||
], | ||
"transform": { | ||
"\\.tsx?$": "./node_modules/typescript-babel-jest", | ||
"\\.js$": "./node_modules/babel-jest", | ||
"\\.md$": "./node_modules/antd-demo-jest/mobile" | ||
}, | ||
"testRegex": ".*\\.test\\.web\\.js$", | ||
"collectCoverageFrom": [ | ||
"components/**/*.{ts,tsx}", | ||
"!components/*/style/index.tsx" | ||
], | ||
"testEnvironment": "jsdom" | ||
} |
163 changes: 163 additions & 0 deletions
163
components/accordion/__tests__/__snapshots__/demo.test.web.js.snap
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,163 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`renders ./components/accordion/demo/accordion.md correctly 1`] = ` | ||
<div | ||
style="margin-top:10px;margin-bottom:10px;" | ||
> | ||
<div | ||
class="am-accordion my-accordion" | ||
> | ||
<div | ||
class="am-accordion-item" | ||
> | ||
<div | ||
aria-expanded="false" | ||
class="am-accordion-header" | ||
role="tab" | ||
> | ||
<i | ||
class="arrow" | ||
/> | ||
标题一 | ||
</div> | ||
</div> | ||
<div | ||
class="am-accordion-item pad" | ||
> | ||
<div | ||
aria-expanded="false" | ||
class="am-accordion-header" | ||
role="tab" | ||
> | ||
<i | ||
class="arrow" | ||
/> | ||
标题二 | ||
</div> | ||
</div> | ||
<div | ||
class="am-accordion-item pad" | ||
> | ||
<div | ||
aria-expanded="false" | ||
class="am-accordion-header" | ||
role="tab" | ||
> | ||
<i | ||
class="arrow" | ||
/> | ||
标题三 | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`renders ./components/accordion/demo/basic.md correctly 1`] = ` | ||
<div | ||
style="margin-top:10px;margin-bottom:10px;" | ||
> | ||
<div | ||
class="am-accordion my-accordion" | ||
> | ||
<div | ||
class="am-accordion-item am-accordion-item-active" | ||
> | ||
<div | ||
aria-expanded="true" | ||
class="am-accordion-header" | ||
role="tab" | ||
> | ||
<i | ||
class="arrow" | ||
/> | ||
标题一 | ||
</div> | ||
<div | ||
class="am-accordion-content am-accordion-content-active" | ||
role="tabpanel" | ||
> | ||
<div | ||
class="am-accordion-content-box" | ||
> | ||
<div | ||
class="am-list my-list" | ||
> | ||
<div | ||
class="am-list-body" | ||
> | ||
<div | ||
class="am-list-item am-list-item-middle" | ||
> | ||
<div | ||
class="am-list-line" | ||
> | ||
<div | ||
class="am-list-content" | ||
> | ||
子内容一 | ||
</div> | ||
</div> | ||
</div> | ||
<div | ||
class="am-list-item am-list-item-middle" | ||
> | ||
<div | ||
class="am-list-line" | ||
> | ||
<div | ||
class="am-list-content" | ||
> | ||
子内容二 | ||
</div> | ||
</div> | ||
</div> | ||
<div | ||
class="am-list-item am-list-item-middle" | ||
> | ||
<div | ||
class="am-list-line" | ||
> | ||
<div | ||
class="am-list-content" | ||
> | ||
子内容三 | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div | ||
class="am-accordion-item pad" | ||
> | ||
<div | ||
aria-expanded="false" | ||
class="am-accordion-header" | ||
role="tab" | ||
> | ||
<i | ||
class="arrow" | ||
/> | ||
标题二 | ||
</div> | ||
</div> | ||
<div | ||
class="am-accordion-item pad" | ||
> | ||
<div | ||
aria-expanded="false" | ||
class="am-accordion-header" | ||
role="tab" | ||
> | ||
<i | ||
class="arrow" | ||
/> | ||
标题三 | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
`; |
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,3 @@ | ||
import { webDemoTest } from '../../../tests/shared/demoTest'; | ||
|
||
webDemoTest('accordion'); |
Oops, something went wrong.