How to use ava-tf - 2 common examples

To help you get started, we’ve selected a few ava-tf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electron-userland / electron-builder / test / index.spec.js View on Github external
test( 'Builder.init', function( t ) {
  t.plan( 2 );

  var Builder = proxyquireStrict(
    'out',
    {
      './platforms' : {}
    }
  );

  t.is( typeof Builder.init, 'function' );
  t.is( typeof Builder.init().build, 'function' );
} );

test.cb( 'Builder.init().build - call the correct platform', function( t ) {
  t.plan( 2 );

  var Builder = proxyquireStrict(
    'out',
    {
      './platforms' : function( platform ) {
        if ( platform === 'bar' ) {
          return {
            init : function() {
              return {
                build : function( options, callback ) {
                  callback( null, 'foo' )
                }
              };
            }
          };
github electron-userland / electron-builder / test / index.spec.js View on Github external
{
      appPath  : 'foo',
      basePath : 'bar',
      platform : 'bar',
      config   : { bar : {} },
      log      : function() {}
    },
    function( error, result ) {
      t.is( error, null );
      t.is( result, 'foo' );
      t.end();
    }
  );
} );

test.cb( 'Builder.init().build - create output directory if not present', function( t ) {
  t.plan( 1 );

  var tmpDir  = tmp.dirSync( { unsafeCleanup : true } );
  var Builder = proxyquireStrict(
    'out',
    {
      './platforms' : function( platform ) {
        if ( platform === 'bar' ) {
          return {
            init : function() {
              return {
                build : function( options, callback ) {
                  callback( null, 'foo' )
                }
              };
            }

ava-tf

Futuristic test runner 🚀

MIT
Latest version published 7 years ago

Package Health Score

60 / 100
Full package analysis

Popular ava-tf functions