@satisfactory-dev/custom-assert
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

Coverage Status Workflow Status

Development

Requirements

  • Docker
    • recommend vscode devcontainer support
    • phpstorm's devcontainer support works but doesn't seem as capable

Instructions

  1. Checkout locally
  2. Load in devcontainer-supporting IDE
    • devcontainer setup should automatically run make install
    • NODE_OPTIONS env var may require opening a fresh terminal if you receieve an error along the lines of TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"

Usage

  1. run npm install --save @satisfactory-dev/custom-assert
  2. integrate with testing solution

Example

Taken from project tests

import {describe, it} from 'node:test';
import assert from 'node:assert/strict';
import {array_has_size} from '@satisfactory-dev/custom-assert';

void describe('array_has_size', () => {
	void it('does not throw', () => {
		assert.doesNotThrow(() => array_has_size([], 0));
		assert.doesNotThrow(() => array_has_size(['foo'], 1));
	});
	void it('does throw', () => {
		assert.throws(() => array_has_size([], 1));
		assert.throws(() => array_has_size([1], 0));
	});
});

License

see LICENSE.md

Readme

Keywords

none

Package Sidebar

Install

npm i @satisfactory-dev/custom-assert

Weekly Downloads

7

Version

0.2.3

License

Apache-2.0

Unpacked Size

15.3 kB

Total Files

5

Last publish

Collaborators

  • signpostmarv