This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import VerEx from 'verbal-expressions'; | |
const eventualCallIs = name => { | |
// FOR PERF | |
const boundCheck = node => | |
node.type === 'Identifier' && node.name === name || | |
node.type === 'MemberExpression' && boundCheck(node.object) || | |
node.type === 'CallExpression' && boundCheck(node.callee) | |
return boundCheck; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// XPath CheatSheet | |
// To test XPath in your Chrome Debugger: $x('/html/body') | |
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
// 0. XPath Examples. | |
// More: http://xpath.alephzarro.com/content/cheatsheet.html | |
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function runNamespacedTest(namespace) { | |
var thisOrgsNs = SfdcDevConsole.hasNamespace() ? SfdcDevConsole.namespace : ''; | |
var ns = namespace || thisOrgsNs; | |
function log(msg) { | |
if (console && console.log) console.log(msg); | |
} | |
function showErrorMessage() { | |
Ext.Msg.alert('Running namespaced tests failed', 'Please look at the javascript console for more information.'); |