const chai = require('chai');
const assert = chai.assert;

const Shrinku = require('../src/shrinku');

let defaultOpts = { url: 'http://google.com' };

context('Shrinku', function() {
  it('should have no adapters after initialization', function() {
    let shrinku = new Shrinku();
    let adaptersCount = Object.keys(shrinku.adapters).length;

    assert(adaptersCount === 0);
  });

  it('when no adapters set, it should still shrink an url', function(done) {
    let shrinku = new Shrinku();
    shrinku.shrink(defaultOpts)
      .then((data) => {
        assert(data.url === defaultOpts.url);
        assert(data.hash !== undefined);

        return done();
      });
  });
});

@@ -389,33 +389,8 @@
 it('
-when no adapters set, it 
 shou
@@ -411,16 +411,39 @@
 k an url
+ when no adapter is set
 ', funct
@@ -650,24 +650,24 @@
 urn done();%0A
-
       %7D);%0A  
@@ -669,13 +669,782 @@
 );%0A  %7D);
+%0A%0A  it('should register a first adapter and set it as default if there%5C's none', function() %7B%0A    let shrinku = new Shrinku();%0A    let memoryAdapter = new Shrinku.Adapters.MemoryAdapter();%0A%0A    shrinku.addAdapter('memory', memoryAdapter);%0A    assert.equal(shrinku.adapters.memory, memoryAdapter);%0A    assert.equal(shrinku.adapters.default, memoryAdapter);%0A  %7D);%0A%0A  it('should add an additional adapter and set it as default', function() %7B%0A    let shrinku = new Shrinku();%0A    let memoryAdapter = new Shrinku.Adapters.MemoryAdapter();%0A    let dumbAdapter = new Shrinku.Adapters.DumbAdapter();%0A%0A    shrinku.addAdapter('memory', memoryAdapter);%0A    shrinku.addAdapter('dumb', dumbAdapter, %7B default: true %7D);%0A%0A    assert.equal(shrinku.adapters.default, dumbAdapter);%0A  %7D);
 %0A%7D);%0A

Add tests