Skip to content

Improve asinit tests #2954

@Mopsgamer

Description

@Mopsgamer

Feature suggestion

This is current initial test code for AS project:

// ./tests/index.js
import assert from "assert";
import { add } from "../build/debug.js";
assert.strictEqual(add(1, 2), 3);
console.log("ok");

Since Node 18 we have the --test flag: node --test tests/**/*. I suggest using this:

// ./tests/index.test.js <-- renamed
import assert from "assert";
import { add } from "../build/debug.js";
import { it } from "node:test";

it('add', () => {
    assert.strictEqual(add(1, 2), 3);
})

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions