Real unit test (isolation, no children render)
Calls:
- constructor
- render
npm i -g license-checker |
// Mocks localStorage | |
const localStorageMock = (function() { | |
let store = {}; | |
return { | |
getItem: (key) => store[key] || null, | |
setItem: (key, value) => store[key] = value.toString(), | |
clear: () => store = {} | |
}; |
var estraverse = require('estraverse'); | |
var fs = require('fs'); | |
fs.readFile('./ast.json', 'utf-8', function(err, ast) { | |
if(err) throw err; | |
const data = JSON.parse(ast); | |
estraverse.traverse(data, { | |
enter: function(node, parent) { | |
if(node.type === "Literal" && parent.type === "ArrayExpression") { | |
if(!Number.isInteger(node.value)){ |
{ | |
"type": "Program", | |
"start": 0, | |
"end": 23, | |
"body": [ | |
{ | |
"type": "VariableDeclaration", | |
"start": 0, | |
"end": 22, | |
"declarations": [ |
var espree = require('espree'); | |
var fs = require('fs'); | |
var code = `let array = [1,2,'b']; | |
`; | |
var ast = espree.parse(code, { | |
ecmaVersion: 6 | |
}); |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
<link rel="import" href="../../bower_components/polymer/polymer.html"> | |
<link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html"> | |
<link rel="import" href="../../bower_components/paper-input/paper-input.html"> | |
<dom-module id="ajax-multiple"> | |
<template> | |
<section id="content"> | |
<paper-input id="post" label="Post" value="{{title}}" on-blur="resolve"> | |
</paper-input> |
<link rel="import" href="https://cdn.rawgit.com/Download/polymer-cdn/master/lib/polymer/polymer.html" /> | |
<link rel="import" href="https://cdn.rawgit.com/Download/polymer-cdn/master/lib/iron-ajax/iron-ajax.html" /> | |
<dom-module id="ajax-element"> | |
<template> | |
<iron-ajax | |
auto | |
url="https://jsonplaceholder.typicode.com/posts/1" | |
handle-as="json" |