as-test 0.3.0 → 0.3.2

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/bin/run.js CHANGED
@@ -7,225 +7,256 @@ import { existsSync, mkdirSync, writeFileSync } from "fs";
7
7
  import { diff } from "typer-diff";
8
8
  const CONFIG_PATH = path.join(process.cwd(), "./as-test.config.json");
9
9
  export async function run() {
10
- const reports = [];
11
- const config = loadConfig(CONFIG_PATH);
12
- const inputFiles = await glob(config.input);
13
- console.log(chalk.dim("Running tests using " + config.runOptions.runtime.name + ""));
14
- const command = config.runOptions.runtime.run.split(" ")[0];
15
- let execPath = getExec(command);
16
- if (!execPath) {
17
- console.log(`${chalk.bgRed(" ERROR ")}${chalk.dim(":")} could not locate ${command} in PATH variable!`);
18
- process.exit(0);
19
- }
20
- if (inputFiles.length) {
21
- console.log(chalk.bold.blueBright(` _____ _____ _____ _____ _____ _____ `));
22
- console.log(chalk.bold.blueBright(`| _ || __| ___|_ _|| __|| __||_ _|`));
23
- console.log(chalk.bold.blueBright(`| ||__ ||___| | | | __||__ | | | `));
24
- console.log(chalk.bold.blueBright(`|__|__||_____| |_| |_____||_____| |_| `));
25
- console.log(chalk.dim("\n------------------- v0.3.0 -------------------\n"));
10
+ const reports = [];
11
+ const config = loadConfig(CONFIG_PATH);
12
+ const inputFiles = await glob(config.input);
13
+ console.log(
14
+ chalk.dim("Running tests using " + config.runOptions.runtime.name + ""),
15
+ );
16
+ const command = config.runOptions.runtime.run.split(" ")[0];
17
+ let execPath = getExec(command);
18
+ if (!execPath) {
19
+ console.log(
20
+ `${chalk.bgRed(" ERROR ")}${chalk.dim(":")} could not locate ${command} in PATH variable!`,
21
+ );
22
+ process.exit(0);
23
+ }
24
+ if (inputFiles.length) {
25
+ console.log(
26
+ chalk.bold.blueBright(` _____ _____ _____ _____ _____ _____ `),
27
+ );
28
+ console.log(
29
+ chalk.bold.blueBright(`| _ || __| ___|_ _|| __|| __||_ _|`),
30
+ );
31
+ console.log(
32
+ chalk.bold.blueBright(`| ||__ ||___| | | | __||__ | | | `),
33
+ );
34
+ console.log(
35
+ chalk.bold.blueBright(`|__|__||_____| |_| |_____||_____| |_| `),
36
+ );
37
+ console.log(
38
+ chalk.dim("\n------------------- v0.3.2 -------------------\n"),
39
+ );
40
+ }
41
+ for (const plugin of Object.keys(config.plugins)) {
42
+ if (!config.plugins[plugin]) continue;
43
+ console.log(
44
+ chalk.bgBlueBright(" PLUGIN ") +
45
+ " " +
46
+ chalk.dim(
47
+ "Using " + plugin.slice(0, 1).toUpperCase() + plugin.slice(1),
48
+ ) +
49
+ "\n",
50
+ );
51
+ }
52
+ for (let i = 0; i < inputFiles.length; i++) {
53
+ const file = inputFiles[i];
54
+ const outFile = path.join(
55
+ config.outDir,
56
+ file.slice(file.lastIndexOf("/") + 1).replace(".ts", ".wasm"),
57
+ );
58
+ let cmd = config.runOptions.runtime.run.replace(command, execPath);
59
+ if (config.buildOptions.target == "bindings") {
60
+ cmd = config.runOptions.runtime.run.replace(command, execPath);
61
+ if (cmd.includes("<name>")) {
62
+ cmd = cmd.replace(
63
+ "<name>",
64
+ file
65
+ .slice(file.lastIndexOf("/") + 1)
66
+ .replace(".ts", "")
67
+ .replace(".spec", ""),
68
+ );
69
+ } else {
70
+ cmd = cmd.replace(
71
+ "<file>",
72
+ outFile
73
+ .replace("build", "tests")
74
+ .replace(".spec", "")
75
+ .replace(".wasm", ".run.js"),
76
+ );
77
+ }
78
+ } else {
79
+ cmd = cmd.replace("<file>", outFile);
26
80
  }
27
- for (const plugin of Object.keys(config.plugins)) {
28
- if (!config.plugins[plugin])
29
- continue;
30
- console.log(chalk.bgBlueBright(" PLUGIN ") +
31
- " " +
32
- chalk.dim("Using " + plugin.slice(0, 1).toUpperCase() + plugin.slice(1)) +
33
- "\n");
81
+ const report = JSON.parse(
82
+ await (() => {
83
+ return new Promise((res, _) => {
84
+ let stdout = "";
85
+ const io = exec(cmd);
86
+ io.stdout.pipe(process.stdout);
87
+ io.stderr.pipe(process.stderr);
88
+ io.stdout.on("data", (data) => {
89
+ stdout += readData(data);
90
+ });
91
+ io.stdout.on("close", () => {
92
+ res(stdout);
93
+ });
94
+ });
95
+ })(),
96
+ );
97
+ reports.push(report);
98
+ }
99
+ if (config.logs && config.logs != "none") {
100
+ if (!existsSync(path.join(process.cwd(), config.logs))) {
101
+ mkdirSync(path.join(process.cwd(), config.logs));
34
102
  }
35
- for (let i = 0; i < inputFiles.length; i++) {
36
- const file = inputFiles[i];
37
- const outFile = path.join(config.outDir, file.slice(file.lastIndexOf("/") + 1).replace(".ts", ".wasm"));
38
- let cmd = config.runOptions.runtime.run.replace(command, execPath);
39
- if (config.buildOptions.target == "bindings") {
40
- cmd = config.runOptions.runtime.run.replace(command, execPath);
41
- if (cmd.includes("<name>")) {
42
- cmd = cmd.replace("<name>", file
43
- .slice(file.lastIndexOf("/") + 1)
44
- .replace(".ts", "")
45
- .replace(".spec", ""));
103
+ writeFileSync(
104
+ path.join(process.cwd(), config.logs, "test.log.json"),
105
+ JSON.stringify(reports, null, 2),
106
+ );
107
+ }
108
+ const reporter = new Reporter(reports);
109
+ if (reporter.failed.length) {
110
+ console.log(chalk.dim("----------------- [FAILED] -------------------\n"));
111
+ for (const failed of reporter.failed) {
112
+ console.log(
113
+ `${chalk.bgRed(" FAIL ")} ${chalk.dim(failed.description)}\n`,
114
+ );
115
+ for (const test of failed.tests) {
116
+ const diffResult = diff(
117
+ JSON.stringify(test._left),
118
+ JSON.stringify(test._right),
119
+ );
120
+ let expected = chalk.dim(JSON.stringify(test._left));
121
+ let received = "";
122
+ for (const res of diffResult.diff) {
123
+ switch (res.type) {
124
+ case "correct": {
125
+ received += chalk.dim(res.value);
126
+ continue;
46
127
  }
47
- else {
48
- cmd = cmd.replace("<file>", outFile
49
- .replace("build", "tests")
50
- .replace(".spec", "")
51
- .replace(".wasm", ".run.js"));
128
+ case "extra": {
129
+ received += chalk.red.strikethrough(res.value);
130
+ continue;
52
131
  }
53
- }
54
- else {
55
- cmd = cmd.replace("<file>", outFile);
56
- }
57
- const report = JSON.parse(await (() => {
58
- return new Promise((res, _) => {
59
- let stdout = "";
60
- const io = exec(cmd);
61
- io.stdout.pipe(process.stdout);
62
- io.stderr.pipe(process.stderr);
63
- io.stdout.on("data", (data) => {
64
- stdout += readData(data);
65
- });
66
- io.stdout.on("close", () => {
67
- res(stdout);
68
- });
69
- });
70
- })());
71
- reports.push(report);
72
- }
73
- if (config.logs && config.logs != "none") {
74
- if (!existsSync(path.join(process.cwd(), config.logs))) {
75
- mkdirSync(path.join(process.cwd(), config.logs));
76
- }
77
- writeFileSync(path.join(process.cwd(), config.logs, "test.log.json"), JSON.stringify(reports, null, 2));
78
- }
79
- const reporter = new Reporter(reports);
80
- if (reporter.failed.length) {
81
- console.log(chalk.dim("----------------- [FAILED] -------------------\n"));
82
- for (const failed of reporter.failed) {
83
- console.log(`${chalk.bgRed(" FAIL ")} ${chalk.dim(failed.description)}\n`);
84
- for (const test of failed.tests) {
85
- const diffResult = diff(JSON.stringify(test._left), JSON.stringify(test._right));
86
- let expected = chalk.dim(JSON.stringify(test._left));
87
- let received = "";
88
- for (const res of diffResult.diff) {
89
- switch (res.type) {
90
- case "correct": {
91
- received += chalk.dim(res.value);
92
- continue;
93
- }
94
- case "extra": {
95
- received += chalk.red.strikethrough(res.value);
96
- continue;
97
- }
98
- case "missing": {
99
- received += chalk.bgBlack(res.value);
100
- continue;
101
- }
102
- case "wrong": {
103
- received += chalk.bgRed(res.value);
104
- continue;
105
- }
106
- case "untouched": {
107
- //received += chalk.bgBlackBright(res.value);
108
- continue;
109
- }
110
- case "spacer": {
111
- //received += chalk.bgBlackBright(res.value);
112
- continue;
113
- }
114
- }
115
- }
116
- if (test.verdict == "fail") {
117
- console.log(`${chalk.dim("(expected) ->")} ${expected}`);
118
- console.log(`${chalk.dim("(received) ->")} ${received}\n`);
119
- }
132
+ case "missing": {
133
+ received += chalk.bgBlack(res.value);
134
+ continue;
135
+ }
136
+ case "wrong": {
137
+ received += chalk.bgRed(res.value);
138
+ continue;
139
+ }
140
+ case "untouched": {
141
+ //received += chalk.bgBlackBright(res.value);
142
+ continue;
120
143
  }
144
+ case "spacer": {
145
+ //received += chalk.bgBlackBright(res.value);
146
+ continue;
147
+ }
148
+ }
121
149
  }
150
+ if (test.verdict == "fail") {
151
+ console.log(`${chalk.dim("(expected) ->")} ${expected}`);
152
+ console.log(`${chalk.dim("(received) ->")} ${received}\n`);
153
+ }
154
+ }
122
155
  }
123
- console.log(chalk.dim("----------------- [RESULTS] ------------------\n"));
124
- process.stdout.write(chalk.bold("Files: "));
125
- if (reporter.failedFiles) {
126
- process.stdout.write(chalk.bold.red(reporter.failedFiles + " failed"));
127
- }
128
- else {
129
- process.stdout.write(chalk.bold.greenBright("0 failed"));
130
- }
131
- process.stdout.write(", " + (reporter.failedFiles + reporter.passedFiles) + " total\n");
132
- process.stdout.write(chalk.bold("Suites: "));
133
- if (reporter.failedSuites) {
134
- process.stdout.write(chalk.bold.red(reporter.failedSuites + " failed"));
135
- }
136
- else {
137
- process.stdout.write(chalk.bold.greenBright("0 failed"));
138
- }
139
- process.stdout.write(", " + (reporter.failedSuites + reporter.passedSuites) + " total\n");
140
- process.stdout.write(chalk.bold("Tests: "));
141
- if (reporter.failedTests) {
142
- process.stdout.write(chalk.bold.red(reporter.failedTests + " failed"));
143
- }
144
- else {
145
- process.stdout.write(chalk.bold.greenBright("0 failed"));
146
- }
147
- process.stdout.write(", " + (reporter.failedTests + reporter.passedTests) + " total\n");
148
- process.stdout.write(chalk.bold("Time: ") + formatTime(reporter.time) + "\n");
149
- if (reporter.failedFiles)
150
- process.exit(1);
151
- process.exit(0);
156
+ }
157
+ console.log(chalk.dim("----------------- [RESULTS] ------------------\n"));
158
+ process.stdout.write(chalk.bold("Files: "));
159
+ if (reporter.failedFiles) {
160
+ process.stdout.write(chalk.bold.red(reporter.failedFiles + " failed"));
161
+ } else {
162
+ process.stdout.write(chalk.bold.greenBright("0 failed"));
163
+ }
164
+ process.stdout.write(
165
+ ", " + (reporter.failedFiles + reporter.passedFiles) + " total\n",
166
+ );
167
+ process.stdout.write(chalk.bold("Suites: "));
168
+ if (reporter.failedSuites) {
169
+ process.stdout.write(chalk.bold.red(reporter.failedSuites + " failed"));
170
+ } else {
171
+ process.stdout.write(chalk.bold.greenBright("0 failed"));
172
+ }
173
+ process.stdout.write(
174
+ ", " + (reporter.failedSuites + reporter.passedSuites) + " total\n",
175
+ );
176
+ process.stdout.write(chalk.bold("Tests: "));
177
+ if (reporter.failedTests) {
178
+ process.stdout.write(chalk.bold.red(reporter.failedTests + " failed"));
179
+ } else {
180
+ process.stdout.write(chalk.bold.greenBright("0 failed"));
181
+ }
182
+ process.stdout.write(
183
+ ", " + (reporter.failedTests + reporter.passedTests) + " total\n",
184
+ );
185
+ process.stdout.write(
186
+ chalk.bold("Time: ") + formatTime(reporter.time) + "\n",
187
+ );
188
+ if (reporter.failedFiles) process.exit(1);
189
+ process.exit(0);
152
190
  }
153
191
  class Reporter {
154
- constructor(reports) {
155
- this.passedFiles = 0;
156
- this.failedFiles = 0;
157
- this.passedSuites = 0;
158
- this.failedSuites = 0;
159
- this.passedTests = 0;
160
- this.failedTests = 0;
161
- this.failed = [];
162
- this.time = 0.0;
163
- this.readReports(reports);
192
+ constructor(reports) {
193
+ this.passedFiles = 0;
194
+ this.failedFiles = 0;
195
+ this.passedSuites = 0;
196
+ this.failedSuites = 0;
197
+ this.passedTests = 0;
198
+ this.failedTests = 0;
199
+ this.failed = [];
200
+ this.time = 0.0;
201
+ this.readReports(reports);
202
+ }
203
+ readReports(reports) {
204
+ for (const file of reports) {
205
+ this.readFile(file);
164
206
  }
165
- readReports(reports) {
166
- for (const file of reports) {
167
- this.readFile(file);
168
- }
207
+ }
208
+ readFile(file) {
209
+ let failed = false;
210
+ for (const suite of file) {
211
+ if (suite.verdict == "fail") {
212
+ failed = true;
213
+ this.failedSuites++;
214
+ } else {
215
+ this.passedSuites++;
216
+ }
217
+ this.time += suite.time.end - suite.time.start;
218
+ for (const subSuite of suite.suites) {
219
+ this.readSuite(subSuite);
220
+ }
221
+ for (const test of suite.tests) {
222
+ if (test.verdict == "fail") this.failed.push(suite);
223
+ this.readTest(test);
224
+ }
169
225
  }
170
- readFile(file) {
171
- let failed = false;
172
- for (const suite of file) {
173
- if (suite.verdict == "fail") {
174
- failed = true;
175
- this.failedSuites++;
176
- }
177
- else {
178
- this.passedSuites++;
179
- }
180
- this.time += suite.time.end - suite.time.start;
181
- for (const subSuite of suite.suites) {
182
- this.readSuite(subSuite);
183
- }
184
- for (const test of suite.tests) {
185
- if (test.verdict == "fail")
186
- this.failed.push(suite);
187
- this.readTest(test);
188
- }
189
- }
190
- if (failed)
191
- this.failedFiles++;
192
- else
193
- this.passedFiles++;
226
+ if (failed) this.failedFiles++;
227
+ else this.passedFiles++;
228
+ }
229
+ readSuite(suite) {
230
+ if (suite.verdict == "fail") {
231
+ this.failedSuites++;
232
+ } else {
233
+ this.passedSuites++;
194
234
  }
195
- readSuite(suite) {
196
- if (suite.verdict == "fail") {
197
- this.failedSuites++;
198
- }
199
- else {
200
- this.passedSuites++;
201
- }
202
- this.time += suite.time.end - suite.time.start;
203
- for (const subSuite of suite.suites) {
204
- this.readSuite(subSuite);
205
- }
206
- for (const test of suite.tests) {
207
- if (test.verdict == "fail")
208
- this.failed.push(suite);
209
- this.readTest(test);
210
- }
235
+ this.time += suite.time.end - suite.time.start;
236
+ for (const subSuite of suite.suites) {
237
+ this.readSuite(subSuite);
211
238
  }
212
- readTest(test) {
213
- if (test.verdict == "fail") {
214
- this.failedTests++;
215
- }
216
- else {
217
- this.passedTests++;
218
- }
239
+ for (const test of suite.tests) {
240
+ if (test.verdict == "fail") this.failed.push(suite);
241
+ this.readTest(test);
219
242
  }
243
+ }
244
+ readTest(test) {
245
+ if (test.verdict == "fail") {
246
+ this.failedTests++;
247
+ } else {
248
+ this.passedTests++;
249
+ }
250
+ }
220
251
  }
221
252
  function readData(data) {
222
- let out = "";
223
- const start = data.indexOf("READ_LINE");
224
- if (start >= 0) {
225
- const slice = data.slice(start + 9);
226
- const end = slice.indexOf("END_LINE");
227
- out += slice.slice(0, end);
228
- out += readData(slice);
229
- }
230
- return out;
253
+ let out = "";
254
+ const start = data.indexOf("READ_LINE");
255
+ if (start >= 0) {
256
+ const slice = data.slice(start + 9);
257
+ const end = slice.indexOf("END_LINE");
258
+ out += slice.slice(0, end);
259
+ out += readData(slice);
260
+ }
261
+ return out;
231
262
  }
package/bin/types.js CHANGED
@@ -1,35 +1,35 @@
1
1
  export class Config {
2
- constructor() {
3
- this.input = ["./assembly/__tests__/*.spec.ts"];
4
- this.outDir = "./build";
5
- this.logs = "./logs";
6
- this.config = "none";
7
- this.plugins = {
8
- coverage: true,
9
- };
10
- this.buildOptions = new BuildOptions();
11
- this.runOptions = new RunOptions();
12
- }
2
+ constructor() {
3
+ this.input = ["./assembly/__tests__/*.spec.ts"];
4
+ this.outDir = "./build";
5
+ this.logs = "./logs";
6
+ this.config = "none";
7
+ this.plugins = {
8
+ coverage: true,
9
+ };
10
+ this.buildOptions = new BuildOptions();
11
+ this.runOptions = new RunOptions();
12
+ }
13
13
  }
14
14
  export class Suite {
15
- constructor() {
16
- this.name = "";
17
- }
15
+ constructor() {
16
+ this.name = "";
17
+ }
18
18
  }
19
19
  export class BuildOptions {
20
- constructor() {
21
- this.args = [];
22
- this.target = "wasi";
23
- }
20
+ constructor() {
21
+ this.args = [];
22
+ this.target = "wasi";
23
+ }
24
24
  }
25
25
  export class RunOptions {
26
- constructor() {
27
- this.runtime = new Runtime();
28
- }
26
+ constructor() {
27
+ this.runtime = new Runtime();
28
+ }
29
29
  }
30
30
  export class Runtime {
31
- constructor() {
32
- this.name = "wasmtime";
33
- this.run = "wasmtime <file>";
34
- }
31
+ constructor() {
32
+ this.name = "wasmtime";
33
+ this.run = "wasmtime <file>";
34
+ }
35
35
  }
package/bin/util.js CHANGED
@@ -3,45 +3,52 @@ import { Config } from "./types.js";
3
3
  import chalk from "chalk";
4
4
  import { delimiter, join } from "path";
5
5
  export function formatTime(ms) {
6
- if (ms < 0) {
7
- throw new Error("Time should be a non-negative number.");
6
+ if (ms < 0) {
7
+ throw new Error("Time should be a non-negative number.");
8
+ }
9
+ // Convert milliseconds to microseconds
10
+ const us = ms * 1000;
11
+ const units = [
12
+ { name: "μs", divisor: 1 },
13
+ { name: "ms", divisor: 1000 },
14
+ { name: "s", divisor: 1000 * 1000 },
15
+ { name: "m", divisor: 60 * 1000 * 1000 },
16
+ { name: "h", divisor: 60 * 60 * 1000 * 1000 },
17
+ { name: "d", divisor: 24 * 60 * 60 * 1000 * 1000 },
18
+ ];
19
+ for (let i = units.length - 1; i >= 0; i--) {
20
+ const unit = units[i];
21
+ if (us >= unit.divisor) {
22
+ const value = Math.round((us / unit.divisor) * 1000) / 1000;
23
+ return `${value}${unit.name}`;
8
24
  }
9
- // Convert milliseconds to microseconds
10
- const us = ms * 1000;
11
- const units = [
12
- { name: "μs", divisor: 1 },
13
- { name: "ms", divisor: 1000 },
14
- { name: "s", divisor: 1000 * 1000 },
15
- { name: "m", divisor: 60 * 1000 * 1000 },
16
- { name: "h", divisor: 60 * 60 * 1000 * 1000 },
17
- { name: "d", divisor: 24 * 60 * 60 * 1000 * 1000 },
18
- ];
19
- for (let i = units.length - 1; i >= 0; i--) {
20
- const unit = units[i];
21
- if (us >= unit.divisor) {
22
- const value = Math.round((us / unit.divisor) * 1000) / 1000;
23
- return `${value}${unit.name}`;
24
- }
25
- }
26
- return `${us}us`;
25
+ }
26
+ return `${us}us`;
27
27
  }
28
28
  export function loadConfig(CONFIG_PATH, warn = false) {
29
- if (!existsSync(CONFIG_PATH)) {
30
- if (warn)
31
- console.log(`${chalk.bgMagentaBright(" WARN ")}${chalk.dim(":")} Could not locate config file in the current directory! Continuing with default config.`);
32
- return new Config();
33
- }
34
- else {
35
- return Object.assign(new Config(), JSON.parse(readFileSync(CONFIG_PATH).toString()));
36
- }
29
+ if (!existsSync(CONFIG_PATH)) {
30
+ if (warn)
31
+ console.log(
32
+ `${chalk.bgMagentaBright(" WARN ")}${chalk.dim(":")} Could not locate config file in the current directory! Continuing with default config.`,
33
+ );
34
+ return new Config();
35
+ } else {
36
+ return Object.assign(
37
+ new Config(),
38
+ JSON.parse(readFileSync(CONFIG_PATH).toString()),
39
+ );
40
+ }
37
41
  }
38
42
  export function getExec(exec) {
39
- const PATH = process.env.PATH.split(delimiter);
40
- for (const pathDir of PATH) {
41
- const fullPath = join(pathDir, exec + (process.platform === "win32" ? ".exe" : ""));
42
- if (existsSync(fullPath)) {
43
- return fullPath;
44
- }
43
+ const PATH = process.env.PATH.split(delimiter);
44
+ for (const pathDir of PATH) {
45
+ const fullPath = join(
46
+ pathDir,
47
+ exec + (process.platform === "win32" ? ".exe" : ""),
48
+ );
49
+ if (existsSync(fullPath)) {
50
+ return fullPath;
45
51
  }
46
- return null;
52
+ }
53
+ return null;
47
54
  }
package/cli/index.ts CHANGED
@@ -11,7 +11,7 @@ const args: string[] = [];
11
11
 
12
12
  const COMMANDS: string[] = ["run", "build", "test", "init"];
13
13
 
14
- const version = "0.3.0";
14
+ const version = "0.3.2";
15
15
 
16
16
  for (const arg of _args) {
17
17
  if (arg.startsWith("-")) flags.push(arg);
package/cli/init.ts CHANGED
@@ -9,7 +9,7 @@ export async function init(args: string[]) {
9
9
  input: process.stdin,
10
10
  output: process.stdout,
11
11
  });
12
- console.log(chalk.bold("as-test init v0.3.0") + "\n");
12
+ console.log(chalk.bold("as-test init v0.3.2") + "\n");
13
13
  console.log(chalk.dim("[1/3]") + " select a target [wasi/bindings]");
14
14
  const target = await ask(chalk.dim(" -> "), rl);
15
15
  if (!TARGETS.includes(target)) {
@@ -184,7 +184,6 @@ const exports = instantiate(module, {});`,
184
184
  existsSync(PKG_PATH) ? readFileSync(PKG_PATH).toString() : "{}",
185
185
  );
186
186
  if (!pkg["scripts"]) pkg["scripts"] = {};
187
- if (pkg.scripts["test"]) process.exit(0);
188
187
  if (!pkg.scripts["pretest"]) {
189
188
  pkg.scripts["pretest"] = "as-test build";
190
189
  pkg.scripts["test"] = "as-test run";
@@ -193,7 +192,7 @@ const exports = instantiate(module, {});`,
193
192
  }
194
193
  if (!pkg["devDependencies"]) pkg["devDependencies"] = {};
195
194
  if (!pkg["devDependencies"]["as-test"])
196
- pkg["devDependencies"]["as-test"] = "^0.3.0";
195
+ pkg["devDependencies"]["as-test"] = "^0.3.2";
197
196
  if (target == "bindings") {
198
197
  pkg["type"] = "module";
199
198
  }
package/cli/run.ts CHANGED
@@ -42,7 +42,7 @@ export async function run() {
42
42
  chalk.bold.blueBright(`|__|__||_____| |_| |_____||_____| |_| `),
43
43
  );
44
44
  console.log(
45
- chalk.dim("\n------------------- v0.3.0 -------------------\n"),
45
+ chalk.dim("\n------------------- v0.3.2 -------------------\n"),
46
46
  );
47
47
  }
48
48