mirror of
https://github.com/cupcakearmy/svelte-i18n.git
synced 2024-11-16 09:59:58 +01: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>
|
||||
|
||||
<svelte:head>
|
||||
<title>{$_.upper('page_title')}</title>
|
||||
<title>{$_('page_title')}</title>
|
||||
</svelte:head>
|
||||
|
||||
<nav>
|
||||
|
@ -63,22 +63,6 @@ describe('collecting format calls', () => {
|
||||
expect(calls[1]).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', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user