Skip to content

Commit

Permalink
testcase 修复
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Jun 11, 2019
1 parent 65f5412 commit 0cfc9fd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
13 changes: 5 additions & 8 deletions __tests__/renderers/Form/__snapshots__/index.test.tsx.snap
Expand Up @@ -220,18 +220,17 @@ exports[`Renderer:Form sendOn:true 1`] = `
</span>
</label>
<div
class="a-Form-control a-TextControl is-disabled"
class="a-Form-control a-TextControl"
>
<div
class="a-TextControl-input"
>
<input
autocomplete="off"
disabled=""
name="a"
placeholder=""
type="text"
value=""
value="1"
/>
</div>
</div>
Expand All @@ -247,18 +246,17 @@ exports[`Renderer:Form sendOn:true 1`] = `
</span>
</label>
<div
class="a-Form-control a-TextControl is-disabled"
class="a-Form-control a-TextControl"
>
<div
class="a-TextControl-input"
>
<input
autocomplete="off"
disabled=""
name="b"
placeholder=""
type="text"
value=""
value="2"
/>
</div>
</div>
Expand All @@ -270,8 +268,7 @@ exports[`Renderer:Form sendOn:true 1`] = `
class="a-Panel-btnToolbar a-Panel-footer"
>
<button
class="a-Button a-Button--primary is-disabled"
disabled=""
class="a-Button a-Button--primary"
type="submit"
>
<span>
Expand Down
1 change: 1 addition & 0 deletions __tests__/renderers/Form/index.test.tsx
Expand Up @@ -453,5 +453,6 @@ test('Renderer:Form sendOn:true', async () => {

expect(fetcher).toHaveBeenCalled();
await p0;
await wait(10);
expect(container).toMatchSnapshot();
});
2 changes: 1 addition & 1 deletion src/factory.tsx
Expand Up @@ -288,7 +288,7 @@ export class RootRenderer extends React.Component<RootRendererProps> {
|| window.location.search && qs.parse(window.location.search.substring(1));

const finalData = query ? createObject({
...(data.__super ? data.__super: null),
...(data && data.__super ? data.__super: null),
...query,
query
}, data) : data;
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Expand Up @@ -12,6 +12,7 @@
"moduleResolution": "node",
"rootDir": "src",
"importHelpers": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceRoot": "src",
"noImplicitReturns": true,
Expand Down

0 comments on commit 0cfc9fd

Please sign in to comment.