From 8f35538034a478ab6f31210257ddbf39e5e12b9e Mon Sep 17 00:00:00 2001 From: Joshua Tenner Date: Wed, 17 Jul 2019 12:50:25 -0400 Subject: [PATCH] [Tests] Add wat output and .gitignore --- tests/.gitignore | 1 + tests/node.js | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 tests/.gitignore diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..21868a6 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1 @@ +*.wat \ No newline at end of file diff --git a/tests/node.js b/tests/node.js index 35cf77c..ddb6730 100644 --- a/tests/node.js +++ b/tests/node.js @@ -132,6 +132,14 @@ for (const file of files) { } function runTest(file, type, binary, wat) { + const watPath = path.join(path.dirname(file), path.basename(file, ".ts")) + + "." + type + ".wat"; + + // should not block testing + fs.writeFile(watPath, wat, (err) => { + if (err) console.warn(err); + }); + const context = new TestContext({ fileName: file, reporter,