@carbonorm/carbonnode 2.0.17 → 2.0.19
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
|
@@ -2,8 +2,9 @@ import {xdescribe, expect, test} from '@jest/globals';
|
|
|
2
2
|
import {CarbonReact} from "@carbonorm/carbonreact";
|
|
3
3
|
import {checkAllRequestsComplete} from "@carbonorm/carbonnode";
|
|
4
4
|
import {act, waitFor} from '@testing-library/react';
|
|
5
|
-
import {C6,
|
|
6
|
-
import {{TABLE_NAME_SHORT_PASCAL_CASE}} from "./{{TABLE_NAME_SHORT_PASCAL_CASE}}";
|
|
5
|
+
import {C6, i{{TABLE_NAME_SHORT_PASCAL_CASE}}, {{TABLE_NAME_SHORT}} } from "{{RELATIVE_OUTPUT_DIR}}/C6";
|
|
6
|
+
import {{TABLE_NAME_SHORT_PASCAL_CASE}} from "./{{TABLE_NAME_SHORT_PASCAL_CASE}}";{{#if REACT_IMPORT}}
|
|
7
|
+
{{{REACT_IMPORT}}};{{/if}}
|
|
7
8
|
|
|
8
9
|
const randomString = Math.random().toString(36).substring(7);
|
|
9
10
|
const randomInt = Math.floor(Math.random() * 1000000);
|
|
@@ -97,8 +98,10 @@ xdescribe('REST {{TABLE_NAME_SHORT_PASCAL_CASE}} api', () => {
|
|
|
97
98
|
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
99
|
{{/each}}
|
|
99
100
|
|
|
101
|
+
{{#if REACT_IMPORT}}
|
|
100
102
|
// wait for the global state to be updated
|
|
101
|
-
expect(
|
|
103
|
+
expect({{{CARBON_REACT_INSTANCE}}}.state.{{TABLE_NAME_SHORT}}).not.toBeUndefined();
|
|
104
|
+
{{/if}}
|
|
102
105
|
|
|
103
106
|
const updateResponse = await {{TABLE_NAME_SHORT_PASCAL_CASE}}.Put(testData)
|
|
104
107
|
|
|
@@ -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
|
/**
|