Skip to content

Instantly share code, notes, and snippets.

View Jones-S's full-sized avatar

Jonas Jones-S

  • Zürich
View GitHub Profile
@Jones-S
Jones-S / testing-map.spec.js
Created November 20, 2019 00:32
Vue testing file
import { shallowMount } from '@vue/test-utils';
import jest from 'jest-mock';
import StoreFinderMap from '../../src/modules/StoreFinder/components/StoreFinderMap/StoreFinderMap.vue';
describe('StoreFinderMap', () => {
let wrapper;
beforeEach(() => {
const initMapMock = jest.fn();
const initMarkersMock = jest.fn();
@Jones-S
Jones-S / Map.vue
Created November 20, 2019 00:27
Map Example Component
<template>
<div class="StoreFinderMap" aria-hidden="true">
<!-- Using v-show because the DOM element has to exist when initiating the map -->
<div v-show="map" ref="map" class="StoreFinderMap__map-wrapper" />
<div class="StoreFinderMap__control-wrapper">
<StoreFinderZoomButton magnify @magnify="magnify">+</StoreFinderZoomButton>
<StoreFinderZoomButton demagnify @demagnify="demagnify">-</StoreFinderZoomButton>
</div>
</div>
</template>
@Jones-S
Jones-S / generate_dot_pattern.js
Created May 4, 2016 16:19
Illustrator Dot-Pattern Generation Script
/**
Draw Dot-Circle Pattern with Illustrator
Copyright(c) 2016 Jonas Scheiwiller
Wed 4 May 2016 18:14:18
JavaScript Script for Adobe Illustrator CC 2015
Tested with Adobe Illustrator CC 19.2.1, Mac OS X El Capitan.
This script provided "as is" without warranty of any kind.
Free to use and distribute.