mirror of
https://github.com/cupcakearmy/svelte-i18n.git
synced 2024-09-28 15:14:45 +02:00
Remove v2 docs and test
This commit is contained in:
parent
bf22d1f0c3
commit
12f0601215
@ -123,7 +123,7 @@ After having the initial locale set, you're ready to start localizing your app.
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$_.upper('page_title')}</title>
|
<title>{$_('page_title')}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
|
@ -63,22 +63,6 @@ describe('collecting format calls', () => {
|
|||||||
expect(calls[1]).toMatchObject({ type: 'CallExpression' })
|
expect(calls[1]).toMatchObject({ type: 'CallExpression' })
|
||||||
expect(calls[2]).toMatchObject({ type: 'CallExpression' })
|
expect(calls[2]).toMatchObject({ type: 'CallExpression' })
|
||||||
})
|
})
|
||||||
|
|
||||||
test('collects all string format utility calls', () => {
|
|
||||||
const ast = parse(`<script>
|
|
||||||
import { _ } from 'svelte-i18n'
|
|
||||||
$_.title('foo')
|
|
||||||
$_.capitalize({ id: 'bar' })
|
|
||||||
$_.lower({ id: 'bar' })
|
|
||||||
$_.upper({ id: 'bar' })
|
|
||||||
</script>`)
|
|
||||||
const calls = collectFormatCalls(ast)
|
|
||||||
expect(calls).toHaveLength(4)
|
|
||||||
expect(calls[0]).toMatchObject({ type: 'CallExpression' })
|
|
||||||
expect(calls[1]).toMatchObject({ type: 'CallExpression' })
|
|
||||||
expect(calls[2]).toMatchObject({ type: 'CallExpression' })
|
|
||||||
expect(calls[3]).toMatchObject({ type: 'CallExpression' })
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('collecting message definitions', () => {
|
describe('collecting message definitions', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user