import test from 'ava';
import { create } from '../lib';

@@ -50,8 +50,499 @@
 ./lib';%0A
+%0Atest('%22create%22 function.', (%7Bis, true: isTrue%7D) =%3E %7B%0A  // Create object.%0A  let Test = create(function(a)%7B%0A    this.a = a;%0A  %7D, %7B%0A    foo: function(a)%7B this.a = a; %7D%0A  %7D);%0A%0A  // Initialize object.%0A  let foo = new Test('baz');%0A%0A  // Check construction value.%0A  is(foo.a, 'baz');%0A%0A  // Change value%0A  foo.foo('qux'); // Haha, foofoo%0A%0A  // Test new value%0A  is(foo.a, 'qux');%0A%0A  // Construction without %22new%22%0A  // jshint newcap: false%0A  let bar = Test('qux');%0A  isTrue(bar instanceof Test);%0A%7D);%0A

Add lib/create.js test