@dinuovos/test-manager

0.1.2 • Public • Published

test-manager: CLI for @dinuovos/test-suite

To work, it reads a configuration json called "test.manager.json"

[  
  {  
    "label" : "An introduction test",  // will be printed in console during process
    "module" : "/tests/test.introduction.for.node.js"  // the module name. See below
  },  
  {  
    "label" : "Show html tests",  
    "module" : "/tests/browser-tests/test.showhtml.methods.html",  // this can be only html
    "headless" : true  // this property set to true will start a puppeteer headless test
  },

Remember to export your test as a function:

function testIntroduction(test) {
    test.createSuite("TestJS test suite",function(){
        test.createTestCase("TestCase #1",function(){
            test.expect(1).toBe(1)
        });
        test.createTestCase("TestCase #2",function(){
            var t = !false;
            test.expect(t).toBe(true)
        });
    });
    test.createSuite("A suite 2",function(){
        test.createTestCase("TestCase #1",function(){
            test.expect(1).toBe(1)
        });
        test.createTestCase("TestCase #2 ( False expected! )",function(){
            var t = !false;
            test.expect(t).toBe(false)
        });
    });
}

Just install the package and try

npx test-suite

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @dinuovos/test-manager

    Weekly Downloads

    2

    Version

    0.1.2

    License

    ISC

    Unpacked Size

    98.4 kB

    Total Files

    29

    Last publish

    Collaborators

    • dinuovos