testeranto 0.49.6 → 0.49.8
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/dist/common/electron.js +4 -4
- package/dist/common/preload.js +4 -4
- package/dist/common/subPackages/react-dom/jsx/web.js +25 -6
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/electron.js +4 -4
- package/dist/module/preload.js +4 -4
- package/dist/module/subPackages/react-dom/jsx/web.js +25 -6
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/subPackages/react-dom/jsx/index.d.ts +2 -3
- package/dist/types/subPackages/react-dom/jsx/node.d.ts +1 -2
- package/dist/types/subPackages/react-dom/jsx/web.d.ts +1 -2
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/electron.ts +8 -8
- package/src/preload.ts +4 -4
- package/src/subPackages/react-dom/jsx/index.ts +2 -2
- package/src/subPackages/react-dom/jsx/web.ts +27 -6
|
@@ -39,8 +39,16 @@ export default <ITestShape extends ITTestShape>(
|
|
|
39
39
|
const myContainer = useRef<any>(null);
|
|
40
40
|
useEffect(() => {
|
|
41
41
|
console.log(
|
|
42
|
-
"useEffect called"
|
|
42
|
+
"useEffect called", myContainer.current
|
|
43
43
|
);
|
|
44
|
+
|
|
45
|
+
if (!myContainer.current) {
|
|
46
|
+
// do componentDidMount logic
|
|
47
|
+
myContainer.current = true;
|
|
48
|
+
} else {
|
|
49
|
+
// do componentDidUpdate logic
|
|
50
|
+
}
|
|
51
|
+
|
|
44
52
|
done(myContainer.current);
|
|
45
53
|
}, []);
|
|
46
54
|
|
|
@@ -90,27 +98,40 @@ export default <ITestShape extends ITTestShape>(
|
|
|
90
98
|
// ignore this type error
|
|
91
99
|
React.createElement(
|
|
92
100
|
TesterantoComponent, {
|
|
93
|
-
done: (reactElement: any) =>
|
|
101
|
+
done: (reactElement: any) => {
|
|
102
|
+
process.nextTick(() => {
|
|
103
|
+
resolve(reactElement)// do something
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
},
|
|
94
107
|
innerComp: testInput
|
|
95
108
|
},
|
|
96
109
|
[]));
|
|
97
110
|
});
|
|
98
111
|
},
|
|
99
112
|
andWhen: function (s: IStore, actioner): Promise<ISelection> {
|
|
100
|
-
return
|
|
113
|
+
return new Promise((resolve, rej) => {
|
|
114
|
+
process.nextTick(() => { resolve(actioner()(s)) })
|
|
115
|
+
});
|
|
101
116
|
},
|
|
102
117
|
butThen: async function (s: IStore): Promise<ISelection> {
|
|
103
|
-
return
|
|
118
|
+
return new Promise((resolve, rej) => {
|
|
119
|
+
process.nextTick(() => { resolve(s) })
|
|
120
|
+
});
|
|
104
121
|
},
|
|
105
122
|
afterEach: async function (
|
|
106
123
|
store: IStore,
|
|
107
124
|
ndx,
|
|
108
125
|
artificer
|
|
109
126
|
) {
|
|
110
|
-
return {
|
|
127
|
+
return new Promise((resolve, rej) => {
|
|
128
|
+
process.nextTick(() => { resolve({}) })
|
|
129
|
+
});
|
|
111
130
|
},
|
|
112
131
|
afterAll: (store: IStore, artificer) => {
|
|
113
|
-
return
|
|
132
|
+
return new Promise((resolve, rej) => {
|
|
133
|
+
process.nextTick(() => { resolve({}) })
|
|
134
|
+
});
|
|
114
135
|
},
|
|
115
136
|
},
|
|
116
137
|
)
|