@carbonorm/carbonreact 3.3.4 → 3.3.6

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonreact",
3
- "version": "3.3.4",
3
+ "version": "3.3.6",
4
4
  "browser": "dist/index.umd.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "main": "dist/index.cjs.js",
@@ -4,7 +4,10 @@ import {checkAllRequestsComplete, isVerbose} from "@carbonorm/carbonnode";
4
4
  import {waitFor} from "@testing-library/react";
5
5
  import {validSQL} from "./validSQL";
6
6
 
7
- export default function ({sqlDirectory = './logs/rest/', logsDirectory = './logs/tests/'}: { sqlDirectory?: string, logsDirectory?: string } = {}) {
7
+ export default function ({sqlDirectory = './logs/rest/', logsDirectory = './logs/tests/'}: {
8
+ sqlDirectory?: string,
9
+ logsDirectory?: string
10
+ } = {}) {
8
11
 
9
12
  const originalWindowLocation = window.location
10
13
 
@@ -50,16 +53,15 @@ export default function ({sqlDirectory = './logs/rest/', logsDirectory = './logs
50
53
 
51
54
  }, {timeout: 3000, interval: 1000});
52
55
 
53
- // this must be a dynamic import to avoid loading dependencies out of order
54
- // await waitForTrailingRequests({testPassed: true, timeout: 12000})
56
+ const jsonSQL = JSON.stringify(validSQL, undefined, 2) ?? '';
55
57
 
56
- console.log('After each Test (' + expect.getState().currentTestName + ')', expect.getState());
58
+ console.log('After each Test (' + expect.getState().currentTestName + ')', validSQL, expect.getState());
57
59
 
58
60
  // restore `window.location` to the original `jsdom`
59
61
  // `Location` object
60
62
  window.location = originalWindowLocation
61
63
 
62
- fs.writeFileSync(validSqlFile(), JSON.stringify(validSQL, undefined, 2) ?? '');
64
+ fs.writeFileSync(validSqlFile(), jsonSQL);
63
65
 
64
66
  }, 65000)
65
67