Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interoperability with native Node.js test, describe and it #209

Open
wellwelwel opened this issue Apr 26, 2024 · 0 comments
Open

Interoperability with native Node.js test, describe and it #209

wellwelwel opened this issue Apr 26, 2024 · 0 comments
Assignees

Comments

@wellwelwel
Copy link
Owner

wellwelwel commented Apr 26, 2024

In the same approach for assert, allow users to use all the essential native approaches in Poku:

From (Node.js homepage):

// tests.mjs
import assert from 'node:assert';
import test from 'node:test';

test('that 1 is equal 1', () => {
  assert.strictEqual(1, 1);
});

test('that throws as 1 is not equal 2', () => {
  // throws an exception because 1 != 2
  assert.strictEqual(1, 2);
});

// run with `node tests.mjs`

To (Poku):

// tests.mjs
import { test, assert } from 'poku';

test('that 1 is equal 1', () => {
  assert.strictEqual(1, 1);
});

test('that throws as 1 is not equal 2', () => {
  // throws an exception because 1 != 2
  assert.strictEqual(1, 2);
});

// run with `npx poku tests.mjs`
  • Same idea for describe and it.
@wellwelwel wellwelwel pinned this issue Apr 26, 2024
@wellwelwel wellwelwel self-assigned this Apr 26, 2024
@github-actions github-actions bot added the stale label May 17, 2024
@wellwelwel wellwelwel removed the stale label May 17, 2024
Repository owner deleted a comment from github-actions bot May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant