Skip to content

Commit

Permalink
release: v0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
JairusSW committed Aug 8, 2024
1 parent 7e4cbbb commit 4bb8505
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ v0.2.1 - Remove accidental logging
v0.3.0 - Pass metadata through terminal - Support for multiple files - Better reporting - Timing for suites - Terminal utilities
v0.3.1 - Add screenshot of completed tests to readme
v0.3.2 - Add `mockImport` to override imported functions
v0.3.3 - Allow `mockImport`'s return type to be any
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
| _ || __| ___|_ _|| __|| __||_ _|
| ||__ ||___| | | | __||__ | | |
|__|__||_____| |_| |_____||_____| |_|
v0.3.2
v0.3.3
</pre>
</h5>

Expand Down
2 changes: 1 addition & 1 deletion assembly/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function afterEach(callback: () => void): void {
*/
export function mockFn(oldFn: Function, newFn: Function): void {}

export function mockImport(oldFn: string, newFn: () => string): void {
export function mockImport<T extends Function>(oldFn: string, newFn: T): void {
__mock_import.set(oldFn, newFn.index);
// mocks.set(oldFn, new MockFn(oldFn, newFn).enable());
}
Expand Down
2 changes: 1 addition & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const _args = process.argv.slice(2);
const flags = [];
const args = [];
const COMMANDS = ["run", "build", "test", "init"];
const version = "0.3.2";
const version = "0.3.3";
for (const arg of _args) {
if (arg.startsWith("-")) flags.push(arg);
else args.push(arg);
Expand Down
4 changes: 2 additions & 2 deletions bin/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function init(args) {
input: process.stdin,
output: process.stdout,
});
console.log(chalk.bold("as-test init v0.3.2") + "\n");
console.log(chalk.bold("as-test init v0.3.3") + "\n");
console.log(chalk.dim("[1/3]") + " select a target [wasi/bindings]");
const target = await ask(chalk.dim(" -> "), rl);
if (!TARGETS.includes(target)) {
Expand Down Expand Up @@ -183,7 +183,7 @@ const exports = instantiate(module, {});`,
}
if (!pkg["devDependencies"]) pkg["devDependencies"] = {};
if (!pkg["devDependencies"]["as-test"])
pkg["devDependencies"]["as-test"] = "^0.3.2";
pkg["devDependencies"]["as-test"] = "^0.3.3";
if (target == "bindings") {
pkg["type"] = "module";
}
Expand Down
2 changes: 1 addition & 1 deletion bin/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function run() {
chalk.bold.blueBright(`|__|__||_____| |_| |_____||_____| |_| `),
);
console.log(
chalk.dim("\n------------------- v0.3.2 -------------------\n"),
chalk.dim("\n------------------- v0.3.3 -------------------\n"),
);
}
for (const plugin of Object.keys(config.plugins)) {
Expand Down
2 changes: 1 addition & 1 deletion cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const args: string[] = [];

const COMMANDS: string[] = ["run", "build", "test", "init"];

const version = "0.3.2";
const version = "0.3.3";

for (const arg of _args) {
if (arg.startsWith("-")) flags.push(arg);
Expand Down
4 changes: 2 additions & 2 deletions cli/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function init(args: string[]) {
input: process.stdin,
output: process.stdout,
});
console.log(chalk.bold("as-test init v0.3.2") + "\n");
console.log(chalk.bold("as-test init v0.3.3") + "\n");
console.log(chalk.dim("[1/3]") + " select a target [wasi/bindings]");
const target = await ask(chalk.dim(" -> "), rl);
if (!TARGETS.includes(target)) {
Expand Down Expand Up @@ -192,7 +192,7 @@ const exports = instantiate(module, {});`,
}
if (!pkg["devDependencies"]) pkg["devDependencies"] = {};
if (!pkg["devDependencies"]["as-test"])
pkg["devDependencies"]["as-test"] = "^0.3.2";
pkg["devDependencies"]["as-test"] = "^0.3.3";
if (target == "bindings") {
pkg["type"] = "module";
}
Expand Down
2 changes: 1 addition & 1 deletion cli/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function run() {
chalk.bold.blueBright(`|__|__||_____| |_| |_____||_____| |_| `),
);
console.log(
chalk.dim("\n------------------- v0.3.2 -------------------\n"),
chalk.dim("\n------------------- v0.3.3 -------------------\n"),
);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "as-test",
"version": "0.3.2",
"version": "0.3.3",
"description": "Testing framework for AssemblyScript. Compatible with WASI or Bindings ",
"types": "assembly/index.ts",
"author": "Jairus Tanaka",
Expand Down
2 changes: 1 addition & 1 deletion run/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@as-test/run",
"version": "0.3.2",
"version": "0.3.3",
"description": "Testing framework for AssemblyScript. Compatible with WASI or Bindings ",
"main": "./lib/index.js",
"author": "Jairus Tanaka",
Expand Down
2 changes: 1 addition & 1 deletion transform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@as-test/transform",
"version": "0.3.2",
"version": "0.3.3",
"description": "Testing framework for AssemblyScript. Compatible with WASI or Bindings ",
"main": "./lib/index.js",
"author": "Jairus Tanaka",
Expand Down

0 comments on commit 4bb8505

Please sign in to comment.