testcase 修复

This commit is contained in:
liaoxuezhi 2019-06-11 14:58:28 +08:00
parent e092d6ad54
commit cc36b8d03c
4 changed files with 8 additions and 9 deletions

View File

@ -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>
@ -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>
@ -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>

View File

@ -453,5 +453,6 @@ test('Renderer:Form sendOn:true', async () => {
expect(fetcher).toHaveBeenCalled();
await p0;
await wait(10);
expect(container).toMatchSnapshot();
});

View File

@ -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;

View File

@ -12,6 +12,7 @@
"moduleResolution": "node",
"rootDir": "src",
"importHelpers": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceRoot": "src",
"noImplicitReturns": true,