1
- import { mount , createLocalVue } from '@vue/test-utils'
1
+ import { mount } from '@vue/test-utils'
2
2
import TypeScript from './components/TypeScript.vue'
3
3
import { resolve } from 'path'
4
4
import { readFileSync } from 'fs'
5
- import VueI18n from 'vue-i18n'
6
5
import jestVue from 'vue-jest'
7
6
import RenderFunction from './components/RenderFunction.vue'
8
7
import Jade from './components/Jade.vue'
@@ -13,10 +12,6 @@ import { randomExport } from './components/NamedExport.vue'
13
12
import Coffee from './components/Coffee.vue'
14
13
import CoffeeScript from './components/CoffeeScript.vue'
15
14
import FunctionalSFCParent from './components/FunctionalSFCParent.vue'
16
- import I18nJSONInline from './components/I18nJSONInline.vue'
17
- import I18nJSONFromSrc from './components/I18nJSONFromSrc.vue'
18
- import I18nYamlInline from './components/I18nYamlInline.vue'
19
- import I18nMergingMultipleBlocks from './components/I18nMergingMultipleBlocks.vue'
20
15
import NoScript from './components/NoScript.vue'
21
16
import Pug from './components/Pug.vue'
22
17
import PugRelative from './components/PugRelativeExtends.vue'
@@ -130,42 +125,3 @@ test('processes SFC with no template', () => {
130
125
const wrapper = mount ( RenderFunction )
131
126
expect ( wrapper . is ( 'section' ) ) . toBe ( true )
132
127
} )
133
-
134
- describe ( 'I18n Processor' , ( ) => {
135
- const setup = ( opts = { locale : 'en' } ) => {
136
- const localVue = createLocalVue ( )
137
- localVue . use ( VueI18n )
138
- const i18n = new VueI18n ( opts )
139
- return { i18n, localVue }
140
- }
141
-
142
- test ( 'processes SFC with i18n JSON inline custom block' , ( ) => {
143
- const { i18n, localVue } = setup ( )
144
- const wrapper = mount ( I18nJSONInline , { i18n, localVue } )
145
- expect ( wrapper . text ( ) ) . toBe ( 'Hello i18n in SFC!' )
146
- expect ( wrapper ) . toMatchSnapshot ( )
147
- } )
148
-
149
- test ( 'processes SFC with i18n JSON in external src attribute' , ( ) => {
150
- const { i18n, localVue } = setup ( )
151
- const wrapper = mount ( I18nJSONFromSrc , { i18n, localVue } )
152
- expect ( wrapper . text ( ) ) . toBe ( 'Hello i18n in SFC!' )
153
- expect ( wrapper ) . toMatchSnapshot ( )
154
- } )
155
-
156
- test ( 'processes SFC with i18n Yaml Inline' , ( ) => {
157
- const { i18n, localVue } = setup ( )
158
- const wrapper = mount ( I18nYamlInline , { i18n, localVue } )
159
- expect ( wrapper . text ( ) ) . toBe ( 'hello world!' )
160
- expect ( wrapper ) . toMatchSnapshot ( )
161
- } )
162
-
163
- test ( 'merges data blocks' , ( ) => {
164
- const { i18n, localVue } = setup ( )
165
- const wrapper = mount ( I18nMergingMultipleBlocks , { i18n, localVue } )
166
- expect ( wrapper . text ( ) ) . toBe ( 'hello world!' )
167
- expect ( typeof wrapper . vm . $t ( 'additionalKey' ) ) . toEqual ( 'string' )
168
-
169
- expect ( wrapper ) . toMatchSnapshot ( )
170
- } )
171
- } )
0 commit comments