Skip to content

Commit

Permalink
Fix 'invariant #dangerouslyRenderMarkup' failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrights committed Aug 7, 2015
1 parent 6d2b3dc commit e6157d0
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions test/PictureShow.test.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
import {jsdom} from "jsdom";

global.document = jsdom("<!doctype html><html><body></body></html>");
global.window = document.defaultView;
global.navigator = window.navigator;

import React from "react/addons";
let TestUtils = React.addons.TestUtils;

var sinon = require('sinon'),
assert = require('should');

let slideshowElm, PictureShow;


PictureShow = require('../src/PictureShow.jsx');

function setUp () {
// import createComponent from './util/createComponent.jsx';
import sinon from 'sinon';
import assert from 'should';
import jsdom from 'jsdom';
for (var i in require.cache) delete require.cache[i];
global.window = {}; global.window.document = {createElement: function(){}};
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
global.window = document.parentWindow;
global.navigator = {
userAgent: 'node.js'
};
const React = require('react/addons');
const TestUtils = React.addons.TestUtils;
const PictureShow = require( '../src/PictureShow.jsx');


let slideshowElm;

function setUp() {
// for (var i in require.cache) delete require.cache[i];
// global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
// global.window = document.parentWindow;
// global.navigator = {
// userAgent: 'node.js'
// };
slideshowElm = (
<PictureShow startingSlide={0} className='added-class' ratio={[3,2]}>
<PictureShow startingSlide={0} className='added-class' ratio={[3, 2]}>
<img className='A'/>
<img className='B'/>
<img className='C'/>
Expand Down

0 comments on commit e6157d0

Please sign in to comment.