On mac:
- Download the latest release.
- Extract the binary and place it in
/usr/local/bin
.
import { Wrapper, mount, VueClass } from '@vue/test-utils' | |
import { Component, VueComponent } from '@lms/types' | |
import { Field } from '@lms-ui/field' | |
import { DatePicker, Calendar, DatePickerProps } from '..' | |
/** | |
* TODO: написать в документацию по тестированию а том, что тестировать clickoutside через document.dispatchEvent приводит к false positive, | |
* потому что смаунченый компонент может просто бытьне прикреплен к document (даже attachTo: document.body в двух подряд тестах не решает этой проблемы в 1.0.0-beta-33) | |
* |
const fs = require('fs') | |
const SVGO = require('svgo') | |
const svgo = new SVGO({ | |
plugins: [ | |
{ removeXMLNS: true }, | |
{ sortAttrs: true }, | |
{ removeDimensions: true }, | |
], |
import { VueClass, ThisTypedMountOptions } from '@vue/test-utils' | |
import Vue from 'vue' | |
declare module '@vue/test-utils' { | |
export interface Wrapper<V, P> extends Wrapper<V> { | |
setProps(props: Partial<P>): void | |
} | |
export declare function mount<V extends Vue, P>(component: VueClass<V>, options?: ThisTypedMountOptions<V, P>): Wrapper<V, P> | |
} |
import mock from "xhr-mock"; | |
import fetch from "../src/fetch"; | |
describe("fetch", () => { | |
beforeEach(() => { | |
mock.setup(); | |
// mock.error(({ req, err }) => console.log(req.url(), err)); | |
}); | |
afterEach(() => { |
// const shaukote = require('./shaukote'); | |
const { performance } = require('perf_hooks'); | |
function closestStraightCity(c, x, y, q) { | |
let resArray = []; // ["city",..,q] | |
// HashX: { | |
// '1': [city:[y,prev,next],city:[y,prev,next],...] | |
// '2': {city:[y,prev,next],city:[y,prev,next],...} | |
// } |
# Using Azure Functions as webhook for serverless telegram bots. | |
# (Thanks to twitter.com/masyan for the idea) | |
# By default the Azure Functions url is https://.../api/HttpTrigger for HttpTrigger type. | |
# In this example we will use clear webhook url without /api/ -> https://.../HttpTrigger. | |
# Also we set "authLevel": "anonymous". | |
# For HttpTrigger type set "route" and "authLevel" in functions.json | |
# { | |
# "bindings": [ |
On mac:
/usr/local/bin
.<ul class="product__option--color"> | |
{% assign color_id_array = product.fields.color_id.value | split: ',' %} | |
{% assign inverse = false %} | |
{% case product.properties.tsvet.characteristics.first.name %} | |
{% when 'Белый' %} | |
{% assign color = 'rgb(255,255,255)' %} |
<script> | |
// (c) Copyright 2016 Caroline Schnapp. All Rights Reserved. Contact: mllegeorgesand@gmail.com | |
// See https://docs.shopify.com/themes/customization/navigation/link-product-options-in-menus | |
// Modified by Jonathan Moore (Style Hatch) https://github.com/jonathanmoore | |
/* | |
Updated to work with sectioned themes | |
- Added required methods from the deprecated options_selection.js | |
- Triggers an initial variant change | |
- Hides sold out variants with only one option |