From 46bd13310a6a5577150258dca3c0ed3554c9b348 Mon Sep 17 00:00:00 2001 From: patak Date: Mon, 16 Jan 2023 11:24:14 +0100 Subject: [PATCH] chore: webtoo.ls as default server (#1215) --- nuxt.config.ts | 3 ++- tests/__snapshots__/content-rich.test.ts.snap | 8 ++++---- tests/__snapshots__/html-parse.test.ts.snap | 8 ++++---- tests/content-rich.test.ts | 10 +++++----- tests/html-parse.test.ts | 10 +++++----- tests/permalinks.test.ts | 6 +++--- 6 files changed, 23 insertions(+), 22 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index ccebc9e4..d89e57ef 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -94,7 +94,8 @@ export default defineNuxtConfig({ pwaEnabled: !isDevelopment || process.env.VITE_DEV_PWA === 'true', // We use LibreTranslate(https://github.com/LibreTranslate/LibreTranslate) as our default translation server #76 translateApi: '', - defaultServer: 'mas.to', + // Use the instance where Elk has its Mastodon account as the default + defaultServer: 'webtoo.ls', }, storage: { driver: isCI ? 'cloudflare' : 'fs', diff --git a/tests/__snapshots__/content-rich.test.ts.snap b/tests/__snapshots__/content-rich.test.ts.snap index a48b9ec2..94da49e0 100644 --- a/tests/__snapshots__/content-rich.test.ts.snap +++ b/tests/__snapshots__/content-rich.test.ts.snap @@ -43,7 +43,7 @@ exports[`content-rich > code frame 2 1`] = ` > Testing
@@ -61,11 +61,11 @@ exports[`content-rich > custom emoji 1`] = ` \\":nuxt:\\" " @@ -137,7 +137,7 @@ exports[`content-rich > link + mention 1`] = ` > (migrated from chai+mocha) diff --git a/tests/__snapshots__/html-parse.test.ts.snap b/tests/__snapshots__/html-parse.test.ts.snap index b2546e6b..d7f36a0d 100644 --- a/tests/__snapshots__/html-parse.test.ts.snap +++ b/tests/__snapshots__/html-parse.test.ts.snap @@ -25,7 +25,7 @@ exports[`html-parse > code frame 2 > html 1`] = ` "

custom emoji > html 1`] = ` \\":nuxt:\\" " @@ -121,7 +121,7 @@ exports[`html-parse > link + mention > html 1`] = ` we’re now using { it('link + mention', async () => { // https://fosstodon.org/@ayo/109383002937620723 - const { formatted } = await render('

Happy 🤗 we’re now using @vitest (migrated from chai+mocha) github.com/ayoayco/astro-react

') + const { formatted } = await render('

Happy 🤗 we’re now using @vitest (migrated from chai+mocha) github.com/ayoayco/astro-react

') expect(formatted).toMatchSnapshot() }) @@ -49,8 +49,8 @@ describe('content-rich', () => { emojis: { nuxt: { shortcode: 'nuxt', - url: 'https://media.mas.to/masto-public/cache/custom_emojis/images/000/288/667/original/c96ba3cb0e0e1eac.png', - staticUrl: 'https://media.mas.to/masto-public/cache/custom_emojis/images/000/288/667/static/c96ba3cb0e0e1eac.png', + url: 'https://media.webtoo.ls/custom_emojis/images/000/000/366/original/73330dfc9dda4078.png', + staticUrl: 'https://media.webtoo.ls/custom_emojis/images/000/000/366/original/73330dfc9dda4078.png', visibleInPicker: true, }, }, @@ -59,13 +59,13 @@ describe('content-rich', () => { }) it('code frame', async () => { - // https://mas.to/@antfu/109396489827394721 + // https://webtoo.ls/@antfu/109396489827394721 const { formatted } = await render('

Testing code block

```ts
import { useMouse, usePreferredDark } from '@vueuse/core'

// tracks mouse position
const { x, y } = useMouse()

// is the user prefers dark theme
const isDark = usePreferredDark()
```

') expect(formatted).toMatchSnapshot() }) it('code frame 2', async () => { - const { formatted } = await render('

@antfu Testing
```ts
const a = hello
```

') + const { formatted } = await render('

@antfu Testing
```ts
const a = hello
```

') expect(formatted).toMatchSnapshot() }) diff --git a/tests/html-parse.test.ts b/tests/html-parse.test.ts index 6769adc9..8693e6d4 100644 --- a/tests/html-parse.test.ts +++ b/tests/html-parse.test.ts @@ -12,7 +12,7 @@ describe('html-parse', () => { it('link + mention', async () => { // https://fosstodon.org/@ayo/109383002937620723 - const { formatted, serializedText } = await render('

Happy 🤗 we’re now using @vitest (migrated from chai+mocha) github.com/ayoayco/astro-react

') + const { formatted, serializedText } = await render('

Happy 🤗 we’re now using @vitest (migrated from chai+mocha) github.com/ayoayco/astro-react

') expect(formatted).toMatchSnapshot('html') expect(serializedText).toMatchSnapshot('text') }) @@ -21,8 +21,8 @@ describe('html-parse', () => { const { formatted, serializedText } = await render('Daniel Roe :nuxt:', { nuxt: { shortcode: 'nuxt', - url: 'https://media.mas.to/masto-public/cache/custom_emojis/images/000/288/667/original/c96ba3cb0e0e1eac.png', - staticUrl: 'https://media.mas.to/masto-public/cache/custom_emojis/images/000/288/667/static/c96ba3cb0e0e1eac.png', + url: 'https://media.webtoo.ls/custom_emojis/images/000/000/366/original/73330dfc9dda4078.png', + staticUrl: 'https://media.webtoo.ls/custom_emojis/images/000/000/366/original/73330dfc9dda4078.png', visibleInPicker: true, }, }) @@ -37,14 +37,14 @@ describe('html-parse', () => { }) it('code frame', async () => { - // https://mas.to/@antfu/109396489827394721 + // https://webtoo.ls/@antfu/109396489827394721 const { formatted, serializedText } = await render('

Testing code block

```ts
import { useMouse, usePreferredDark } from '@vueuse/core'

// tracks mouse position
const { x, y } = useMouse()

// is the user prefers dark theme
const isDark = usePreferredDark()
```

') expect(formatted).toMatchSnapshot('html') expect(serializedText).toMatchSnapshot('text') }) it('code frame 2', async () => { - const { formatted, serializedText } = await render('

@antfu Testing
```ts
const a = hello
```

') + const { formatted, serializedText } = await render('

@antfu Testing
```ts
const a = hello
```

') expect(formatted).toMatchSnapshot('html') expect(serializedText).toMatchSnapshot('text') }) diff --git a/tests/permalinks.test.ts b/tests/permalinks.test.ts index d9e994c6..fe3127fa 100644 --- a/tests/permalinks.test.ts +++ b/tests/permalinks.test.ts @@ -5,12 +5,12 @@ const validPermalinks = [ 'https://m1as-social34.to.social/@elk', 'https://m1as-social34.to.social/@elk22/123', 'https://m1as-social34.to.social/@elk22/objects/123', - 'mas.to/@elk', + 'webtoo.ls/@elk', ] const invalidPermalinks = [ - 'https://mas.to', - 'https://mas.to/elk/123', + 'https://webtoo.ls', + 'https://webtoo.ls/elk/123', ] describe('permalinks', () => {