0.2.7 • Published 7 years ago

dbc-bdd v0.2.7

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
7 years ago

Dbc-Bdd project

Light BDD-framework for developing the tests: unit, integration, etc...

Supports:

  • asynchronous test execution
  • test grouping

Depends on:

How to use library in your own project:

const bdd   = require("../build/bdd.js");
const group = bdd.createGroup({
    name         : "My first test-group",
    runAtBrowser : true,
    tests        : new Array(
        bdd.describe("Testing the methods of the dynamically loaded module", async() => {
            await loadAsBlobUrl("module.math.js");
            const awaitedResult = 5;

            const myMath = new MyMath();
            const result = myMath.add(2, 3);

            contract.isNumber(result);
            contract.areNumbersEqual(result, awaitedResult);
        }),
        bdd.describe("Simple test", async() => {
            contract.isNotEmptyString("Moscow");
        }),
        bdd.describe("Empty-array check test", async() => {
            contract.isEmptyArray([]);
        }),
        bdd.describe("Array check test", async() => {
            contract.isNotEmptyArray([ 1, 2, 3 ]);
        }),
    )
});

How to install/test library:

Run the following commands at the library source path:

// for restoring the dependencies
npm install

// for the project build
npm run build

// for the live sample of the library use
npm run show-sdk
0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago