Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<meta charset="UTF-8">
<title>custom-quiz basic tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../../bower_components/test-fixture/test-fixture-mocha.js"></script>
<script src="../../../bower_components/iron-test-helpers/mock-interactions.js"></script>
@cdata
cdata / gist:9117549
Last active August 29, 2015 13:56 — forked from getify/gist:9110935

Consistency is in the eye of the beholder..

// Hey, what gives here? This is weird and unexpected.
// Why is the promise factory called synchronously, when
// all the other steps resolve async? For consistency,
// one would expect them all to be async.

var p = new Promise(function(resolve,reject){
 console.log("what");
parseGeoDump([{"coords":{"latitude":37.78849446,"longitude":-122.40108252,"accuracy":46,"altitude":19.399999618530273,"heading":null,"speed":null,"altitudeAccuracy":null},"timestamp":"2013-02-20T03:39:17.000Z"},{"coords":{"latitude":37.78849446,"longitude":-122.40108252,"accuracy":46,"altitude":19.399999618530273,"heading":null,"speed":null,"altitudeAccuracy":null},"timestamp":"2013-02-20T03:39:17.000Z"},{"coords":{"latitude":37.78849446,"longitude":-122.40108252,"accuracy":46,"altitude":19.399999618530273,"heading":null,"speed":null,"altitudeAccuracy":null},"timestamp":"2013-02-20T03:39:17.000Z"},{"coords":{"latitude":37.78812101,"longitude":-122.40096037,"accuracy":32,"altitude":13,"heading":null,"speed":null,"altitudeAccuracy":null},"timestamp":"2013-02-20T03:39:20.000Z"},{"coords":{"latitude":37.78802307,"longitude":-122.40093011,"accuracy":30,"altitude":7.5,"heading":null,"speed":null,"altitudeAccuracy":null},"timestamp":"2013-02-20T03:39:23.000Z"},{"coords":{"latitude":37.78797708,"longitude":-122.40089