Skip to content

Improve asinit tests #2954

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);
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions