@carbonorm/carbonnode 2.0.17 → 2.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {xdescribe, expect, test} from '@jest/globals';
|
|
2
|
-
import {CarbonReact} from "@carbonorm/carbonreact";
|
|
3
2
|
import {checkAllRequestsComplete} from "@carbonorm/carbonnode";
|
|
4
3
|
import {act, waitFor} from '@testing-library/react';
|
|
5
|
-
import {C6, iRestfulObjectArrayTypes,
|
|
6
|
-
import {{TABLE_NAME_SHORT_PASCAL_CASE}} from "./{{TABLE_NAME_SHORT_PASCAL_CASE}}";
|
|
4
|
+
import {C6, iRestfulObjectArrayTypes, {{TABLE_NAME_SHORT}} } from "{{RELATIVE_OUTPUT_DIR}}/C6";
|
|
5
|
+
import {{TABLE_NAME_SHORT_PASCAL_CASE}} from "./{{TABLE_NAME_SHORT_PASCAL_CASE}}";{{#if REACT_IMPORT}}
|
|
6
|
+
{{{REACT_IMPORT}}};{{/if}}
|
|
7
7
|
|
|
8
8
|
const randomString = Math.random().toString(36).substring(7);
|
|
9
9
|
const randomInt = Math.floor(Math.random() * 1000000);
|
|
@@ -97,8 +97,10 @@ xdescribe('REST {{TABLE_NAME_SHORT_PASCAL_CASE}} api', () => {
|
|
|
97
97
|
testData.{{COLUMN_NAME}} = {{#TYPESCRIPT_TYPE_IS_STRING}}fillString.substring(0, {{MAX_LENGTH}}){{/TYPESCRIPT_TYPE_IS_STRING}}{{#TYPESCRIPT_TYPE_IS_NUMBER}}randomInt{{/TYPESCRIPT_TYPE_IS_NUMBER}};
|
|
98
98
|
{{/each}}
|
|
99
99
|
|
|
100
|
+
{{#if REACT_IMPORT}}
|
|
100
101
|
// wait for the global state to be updated
|
|
101
|
-
expect(
|
|
102
|
+
expect({{{CARBON_REACT_INSTANCE}}}.state.{{TABLE_NAME_SHORT}}).not.toBeUndefined();
|
|
103
|
+
{{/if}}
|
|
102
104
|
|
|
103
105
|
const updateResponse = await {{TABLE_NAME_SHORT_PASCAL_CASE}}.Put(testData)
|
|
104
106
|
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
Modify{{/REACT_IMPORT}}
|
|
14
14
|
} from "@carbonorm/carbonnode";{{#REACT_IMPORT}}
|
|
15
15
|
import {AxiosResponse} from "axios";{{/REACT_IMPORT}}
|
|
16
|
-
import {C6,
|
|
16
|
+
import {C6, {{TABLE_NAME_SHORT}}, RestTableNames} from "./C6";{{#if REACT_IMPORT}}
|
|
17
17
|
{{{REACT_IMPORT}}};{{/if}}
|
|
18
18
|
|
|
19
19
|
/**
|