Skip to content

Instantly share code, notes, and snippets.

View holylander's full-sized avatar
🏠
Working from home

Alberto Suarez C. holylander

🏠
Working from home
View GitHub Profile
@holylander
holylander / allowStringsInJest.js
Last active November 20, 2020 16:59
spfx localized strings Jest testing workaround
//just save a copy of this script under ./scripts/
const fs = require("fs");
/** returns an arrays with as many indexes as "target" appeards on input */
const findIndexes = (input, target) => {
const indexes = [];
var currentIndex = 0;
while (currentIndex < input.length) {
currentIndex = input.indexOf(target, currentIndex)