push
github
503 of 772 branches covered (0.0%)
34 of 65 new or added lines in 14 files covered. (52.31%)
13502 existing lines in 185 files now uncovered.9060 of 34265 relevant lines covered (26.44%)
11.53 hits per line
UNCOV
1
|
import {
|
|
UNCOV
2
|
compileToFunction, |
× |
UNCOV
3
|
createCoreContext, |
× |
UNCOV
4
|
registerMessageCompiler, |
× |
UNCOV
5
|
resolveValue, |
× |
UNCOV
6
|
translate, |
× |
UNCOV
7
|
} from '@intlify/core'
|
× |
UNCOV
8
|
|
× |
9 |
const createI18n = (translationData, language) => { |
× |
10 |
registerMessageCompiler(compileToFunction) |
× |
UNCOV
11
|
|
× |
12 |
const context = createCoreContext({ |
× |
UNCOV
13
|
locale: language,
|
× |
UNCOV
14
|
fallbackLocale: 'en', |
× |
UNCOV
15
|
messages: translationData,
|
× |
UNCOV
16
|
missingWarn: false, |
× |
UNCOV
17
|
fallbackWarn: false, |
× |
UNCOV
18
|
messageResolver: resolveValue,
|
× |
UNCOV
19
|
}) |
× |
UNCOV
20
|
|
× |
21 |
return {
|
× |
UNCOV
22
|
translate: (...args) => {
|
× |
23 |
return translate(context, ...args)
|
× |
UNCOV
24
|
}, |
× |
UNCOV
25
|
} |
× |
UNCOV
26
|
} |
× |
UNCOV
27
|
|
× |
UNCOV
28
|
export default createI18n |
× |