Skip to content

Instantly share code, notes, and snippets.

View pipedreambomb's full-sized avatar

George Nixon pipedreambomb

View GitHub Profile
console.error
Warning: An update to App inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
<span id='date-me'></span>
<script type='text/JavaScript'>document.getElementById('date-me').innerHTML = new Date(Date.parse('Wed, 09 Aug 1995 00:00:00 GMT')).toLocaleString()</script>
@pipedreambomb
pipedreambomb / noie.html
Last active December 16, 2015 16:09
Page instructing users that some versions of Internet Explorer are not supported.
<html>
<body>
<div style='clear: both; height: 112px; padding:0; position: relative; float:right;'>
<a href="http://www.theie8countdown.com/ie-users-info">
<img src="http://www.theie8countdown.com/assets/badge_iecountdown.png" border="0" height="112" width="348" alt="" />
</a>
</div>
<h2 style="margin-top:50px;">Unfortunately, Giving Counts does not support Internet Explorer 8 or lower at this time.</h2>
<p>In particular, the site does not work at all with Internet Explorer 7, 6 or lower. This is due to the modern technology used in Giving Counts. 99% of internet users no longer use these browsers, and they are difficult to support and limit functionality. Please do yourself a favour and upgrade your browser! If you can't because of external factors, you could at least <a href="http://www.google.com/chromeframe">try Chrome Frame</a> for your current browser.
</body>
it 'displays name of charity', ->
frag = Meteor.render Template.transactions
(frag.querySelector "td").innerHTML.should.have.string "Test cause"
Template.transactions.helpers
cause: ->
gave.Causes.findOne(@cause_id)?.name