import assert from "assert";
import { Resolver } from "../dist";
import React from "react";

import PropsFixture from "./support/PropsFixture";
import PropsFixtureContainer from "./support/PropsFixtureContainer";

describe("Resolver", function() {
  describe(".renderToStaticMarkup", function() {
    context("when given a `React.Component`", function() {
      it("matches React.renderToStaticMarkup", function(done) {
        const expected = React.renderToStaticMarkup(<PropsFixture user="Eric" />);

        Resolver.renderToStaticMarkup(<PropsFixture user="Eric" />)
          .then((markup) => {
            assert.equal(markup, expected);
          }, done)
          .then(done, done)
          .catch(done)
        ;
      });
    });

    context("when given a <Container />", function() {
      it("matches React.renderToStaticMarkup", function(done) {
        const expected = React.renderToStaticMarkup(
          <PropsFixture user="Eric" />
        );

        Resolver.renderToStaticMarkup(<PropsFixtureContainer />)
          .then((markup) => {
            assert.equal(markup, expected);
          })
          .then(done, done)
          .catch(done)
        ;
      });
    });
  });
});

@@ -670,36 +670,30 @@
       .then(
-done, 
 done)%0A
+
           .c
@@ -955,32 +955,77 @@
     );%0A%0A        
+const render = function() %7B%0A          return 
 Resolver.renderT
@@ -1060,24 +1060,170 @@
 ontainer /%3E)
+;%0A        %7D%0A%0A        render()%0A          .then((markup) =%3E %7B%0A            assert.equal(markup, expected);%0A%0A            return render();%0A          %7D)
 %0A          .
@@ -1290,32 +1290,32 @@
 );%0A          %7D)%0A
+
           .then(
@@ -1318,14 +1318,8 @@
 hen(
-done, 
 done

Test multiple renders