{"size": 739, "ext": "js", "max_stars_repo_path": "functions/try/test/success.test.js", "max_stars_repo_name": "geronimus/jslib", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "functions/try/test/success.test.js", "max_issues_repo_name": "geronimus/jslib", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "functions/try/test/success.test.js", "max_forks_repo_name": "geronimus/jslib", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.1142857143, "max_line_length": 63, "alphanum_fraction": 0.5656292287}
const { assert } = require( "chai" );
const { Success } = require( "../src/try" );

describe( "Success", () => {

  it( "Identifies itself as a Success.", () => {
    
    assert.isTrue( Success().isSuccess );
  });

  it( "Identifies itself as not a Failiure.", () => {
    
    assert.isFalse( Success().isFailure );
  });

  it( "Is an instance of a Success.", () => {
    
    assert.instanceOf( Success(), Success );
  });

  it( "No two Successes are the same.", () => {

    assert.notStrictEqual( Success(), Success() );
  });

  it( "Exposes the object you pass to it as `result`.", () => {

    const returnValue = 0;
    const success = Success( returnValue );

    assert.strictEqual( success.result, returnValue );
  });
});

