forked from intlify/vue-i18n-jest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support vue-jest@v5 (intlify#23)
Refs: intlify#23
- Loading branch information
XavierChevalier
committed
Nov 30, 2021
1 parent
afaa5c3
commit d21ed55
Showing
5 changed files
with
78 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,76 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`process (default.vue) returns expected string: default.vue 1`] = ` | ||
"__vue__options__.__i18n = [ | ||
'{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}' | ||
]" | ||
Array [ | ||
"Component.__i18n = Component.__i18n || [];", | ||
"Component.__i18n.push({\\"locale\\":\\"\\",\\"resource\\":{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}});", | ||
] | ||
`; | ||
|
||
exports[`process (json.vue) returns expected string: json.vue 1`] = ` | ||
"__vue__options__.__i18n = [ | ||
'{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}' | ||
]" | ||
Array [ | ||
"Component.__i18n = Component.__i18n || [];", | ||
"Component.__i18n.push({\\"locale\\":\\"\\",\\"resource\\":{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}});", | ||
] | ||
`; | ||
|
||
exports[`process (json-locale.vue) returns expected string: json-locale.vue 1`] = ` | ||
"__vue__options__.__i18n = [ | ||
'{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"}}', | ||
'{\\"en\\":{\\"hello\\":\\"hello!\\"}}' | ||
]" | ||
Array [ | ||
"Component.__i18n = Component.__i18n || [];", | ||
"Component.__i18n.push({\\"locale\\":\\"ja\\",\\"resource\\":{\\"hello\\":\\"こんにちは!\\"}});", | ||
"Component.__i18n.push({\\"locale\\":\\"en\\",\\"resource\\":{\\"hello\\":\\"hello!\\"}});", | ||
] | ||
`; | ||
|
||
exports[`process (json-src-import.vue) returns expected string: json-src-import.vue 1`] = ` | ||
"__vue__options__.__i18n = [ | ||
'{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}' | ||
]" | ||
Array [ | ||
"Component.__i18n = Component.__i18n || [];", | ||
"Component.__i18n.push({\\"locale\\":\\"\\",\\"resource\\":{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}});", | ||
] | ||
`; | ||
|
||
exports[`process (json5.vue) returns expected string: json5.vue 1`] = ` | ||
"__vue__options__.__i18n = [ | ||
'{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}' | ||
]" | ||
Array [ | ||
"Component.__i18n = Component.__i18n || [];", | ||
"Component.__i18n.push({\\"locale\\":\\"\\",\\"resource\\":{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}});", | ||
] | ||
`; | ||
|
||
exports[`process (json5-locale.vue) returns expected string: json5-locale.vue 1`] = ` | ||
"__vue__options__.__i18n = [ | ||
'{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"}}', | ||
'{\\"en\\":{\\"hello\\":\\"hello!\\"}}' | ||
]" | ||
Array [ | ||
"Component.__i18n = Component.__i18n || [];", | ||
"Component.__i18n.push({\\"locale\\":\\"ja\\",\\"resource\\":{\\"hello\\":\\"こんにちは!\\"}});", | ||
"Component.__i18n.push({\\"locale\\":\\"en\\",\\"resource\\":{\\"hello\\":\\"hello!\\"}});", | ||
] | ||
`; | ||
|
||
exports[`process (json5-src-import.vue) returns expected string: json5-src-import.vue 1`] = ` | ||
"__vue__options__.__i18n = [ | ||
'{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}' | ||
]" | ||
Array [ | ||
"Component.__i18n = Component.__i18n || [];", | ||
"Component.__i18n.push({\\"locale\\":\\"\\",\\"resource\\":{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}});", | ||
] | ||
`; | ||
|
||
exports[`process (no-i18n.vue) returns expected string: no-i18n.vue 1`] = `""`; | ||
exports[`process (no-i18n.vue) returns expected string: no-i18n.vue 1`] = `Array []`; | ||
|
||
exports[`process (yaml.vue) returns expected string: yaml.vue 1`] = ` | ||
"__vue__options__.__i18n = [ | ||
'{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}' | ||
]" | ||
Array [ | ||
"Component.__i18n = Component.__i18n || [];", | ||
"Component.__i18n.push({\\"locale\\":\\"\\",\\"resource\\":{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}});", | ||
] | ||
`; | ||
|
||
exports[`process (yaml-locale.vue) returns expected string: yaml-locale.vue 1`] = ` | ||
"__vue__options__.__i18n = [ | ||
'{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"}}', | ||
'{\\"en\\":{\\"hello\\":\\"hello!\\"}}' | ||
]" | ||
Array [ | ||
"Component.__i18n = Component.__i18n || [];", | ||
"Component.__i18n.push({\\"locale\\":\\"ja\\",\\"resource\\":{\\"hello\\":\\"こんにちは!\\"}});", | ||
"Component.__i18n.push({\\"locale\\":\\"en\\",\\"resource\\":{\\"hello\\":\\"hello!\\"}});", | ||
] | ||
`; | ||
|
||
exports[`process (yaml-src-import.vue) returns expected string: yaml-src-import.vue 1`] = ` | ||
"__vue__options__.__i18n = [ | ||
'{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}' | ||
]" | ||
Array [ | ||
"Component.__i18n = Component.__i18n || [];", | ||
"Component.__i18n.push({\\"locale\\":\\"\\",\\"resource\\":{\\"ja\\":{\\"hello\\":\\"こんにちは!\\"},\\"en\\":{\\"hello\\":\\"hello!\\"}}});", | ||
] | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters