We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 463801f commit 3d3f61cCopy full SHA for 3d3f61c
libcpptest/src/gtest_main.cpp
@@ -17,7 +17,23 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
17
#include "gtest/gtest.h"
18
#include "MCTapListener.h"
19
20
+#ifdef __EMSCRIPTEN__
21
+#include <emscripten.h>
22
+#endif
23
+
24
int main(int argc, char **argv) {
25
26
27
+ // Mount and cd into a nodefs filesystem so that emscripten tests
28
+ // have the same access to the filesystem as native tests. In
29
+ // particular, they can write to a log file.
30
+ EM_ASM(
31
+ FS.mkdir('root');
32
+ FS.mount(NODEFS, { root: '/' }, 'root');
33
+ FS.chdir('root/' + process.cwd());
34
+ );
35
36
37
testing::InitGoogleTest(&argc, argv);
38
39
for (int i = 0; i < argc; i++) {
0 commit comments