This file contains hidden or 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
<script> | |
import { createEventDispatcher } from "svelte"; | |
export let cell; | |
export let overrideVisible = false; | |
const dispatch = new createEventDispatcher(); | |
function unhideCell() { | |
if (cell.hasMine) { |
This file contains hidden or 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 anonymous(Vue) { | |
const _Vue = Vue | |
return function render() { | |
with (this) { | |
const { | |
toDisplayString: _toDisplayString, | |
createVNode: _createVNode, | |
createBlock: _createBlock, | |
openBlock: _openBlock |
This file contains hidden or 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 finishComponentSetup( | |
instance: ComponentInternalInstance | |
/* elided argument */ | |
) { | |
const Component = instance.type as ComponentOptions | |
if (Component.template && !Component.render) { | |
Component.render = compile!(Component.template /* elided arg */) | |
} | |
/* elided details */ |
This file contains hidden or 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 patch( | |
n1: HostVNode | null | |
n2: HostVNode, | |
container: HostElement | |
/* elided arguments */ | |
) { | |
/* elided */ | |
const { type, shapeFlag } = n2 | |
switch (type) { |
This file contains hidden or 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
export interface VNode<HostNode = any, HostElement = any> { | |
_isVNode: true | |
type: VNodeTypes | |
props: VNodeProps | null | |
/* elided */ | |
children: VNodeNormalizedChildren<HostNode, HostElement> | |
component: ComponentInternalInstance | null | |
/* elided */ | |
// DOM |
This file contains hidden or 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 { shallowMount } from '@vue/test-utils' | |
import PaymentWithCard from '@/components/PaymentWithCard.vue' | |
export default function() { | |
let amountInEuros = 100 | |
let cardNumber = null, | |
cardHolder = null, | |
expirationDate = null | |
let successMsgSpy = jest.fn() | |
let errorMsgSpy = jest.fn() |
This file contains hidden or 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 testWrapperBuilder from './PaymentWithCard.spec.factory' | |
import api from '@/api/paymentAPI' | |
jest.mock('@/api/paymentAPI', function() { | |
return { pay: jest.fn() } | |
}) | |
describe('Payment with card', () => { | |
beforeEach(() => { | |
jest.clearAllMocks() |
This file contains hidden or 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
<script> | |
import paymentAPI from '@/api/paymentAPI' | |
export default { | |
name: 'PaymentWithCard', | |
props: ['amountInEuros'], | |
data() { | |
return { |