mocha-it
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    Mocha-it

    Replace it in mocha with asynchronous

    Usage

    import mochaIt from 'mocha-it';
    
    // Run async function with 1 sec timeout
    it('Run Basic', mochaIt(async (done) => {
    	done();
    }));
    
    // Run async function with 5 sec timeout
    it('Timeout', mochaIt(async (done) => {
    	done();
    }, 5000));
    
    // When catch the error, this action stop immediately
    it('Exception', mochaIt(async (done) => {
    	throw new Error('1 + 1 != 3');
    }));

    Support Git History

    Credits

    Based on these amazing projects:

    License

    MIT

    Install

    npm i mocha-it

    DownloadsWeekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    4.86 kB

    Total Files

    9

    Last publish

    Collaborators

    • rhea31