Skip to content

Instantly share code, notes, and snippets.

View fmoessle's full-sized avatar

Florian Streise fmoessle

View GitHub Profile
const { pathsToModuleNameMapper } = require('ts-jest/utils')
const { compilerOptions } = require('./tsconfig')
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
// this enables us to use tsconfig-paths with jest
modulePaths: [compilerOptions.baseUrl],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths)
{
"compilerOptions": {
"baseUrl": "src"
"paths": {
"@utils/*": ["utils/*"],
}
}
}
<template>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "Books",
"item": "https://example.com/books"
<script>
export default {
data () {
const jsonld = {
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "Books",
@fmoessle
fmoessle / component.vue
Created October 19, 2023 16:51
component.vue
<script lang="ts" setup>
const jsonld = {
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "Books",
"item": "https://example.com/books"
}, {