0.0.27 • Published 16 days ago

@ibgib/helper-gib v0.0.27

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
16 days ago

🚧

I have created a working MVP for ibgib that shows some of the potential for the architecture:

I'm pulling out behavior from the ionic-gib project into this lib.

helper-gib - shared, utils, common, respec testing framework and more

This library contains shared helper members (mostly functions) (a.k.a. "utils", "shared", "common", etc.) that are not necessarily directly ibgib-related but that are useful with ibgib in mind and thus consumed in multiple ibgib libs.

This also contains "respec-gib" (for now anyway until I break it out at a later time mayhap), which is a relatively simple testing harness for ES modules only.

respec-gib

it's similar to other unit testing frameworks, but way less complicated, way better jargon, and way more respecful. In the future, it would probably be best to allow customizable jargon. Anyway, here is the deets.

NOTE: It only works in node atow, but I will be adding a simple server for executing in a browser environment as well.

"config"

In lieu of a config file, right now it configures execution via a script file, currently at respec-gib.node.mjs. This file does two basic things:

  1. locates respec files containing respecful specs
  2. executes those respecs

atow this execution occurs via an esm dynamic import call for each respec path.

politely equal

When you go to create your foo.respec.mts file (or however you end up naming it), at the very top you should import and set a respecful title:

import { respecfully, iReckon, ifWe, firstOfAll, firstOfEach } from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
const maam = `[${import.meta.url}]`, sir = maam;

You can include whatever respecful pronoun you want here. Then, you use this throughout taken from respec-gib.respec.mts:

await respecfully(sir, 'firstOfAll only', async () => {
    let firstOfAllTriggered = false;

    firstOfAll(sir, async () => {
        firstOfAllTriggered = true;
    });

    await ifWe(sir, `do an ifWe block, firstOfAll should've triggered`, async () => {
        iReckon(sir, firstOfAllTriggered).isGonnaBeTrue();
    });
});
0.0.26

16 days ago

0.0.27

16 days ago

0.0.25

17 days ago

0.0.24

2 months ago

0.0.23

2 months ago

0.0.21

2 months ago

0.0.22

2 months ago

0.0.20

3 months ago

0.0.19

3 months ago

0.0.18

3 months ago

0.0.11

9 months ago

0.0.12

9 months ago

0.0.13

8 months ago

0.0.14

8 months ago

0.0.15

8 months ago

0.0.16

6 months ago

0.0.17

6 months ago

0.0.10

10 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

12 months ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago