mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-27 06:29:19 +08:00
Add missing files
This commit is contained in:
parent
e7c2ceeeb4
commit
18274d4d22
4
resources/assets/tests/__mocks__/toastr.js
Normal file
4
resources/assets/tests/__mocks__/toastr.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export default {
|
||||||
|
success() {},
|
||||||
|
warning() {},
|
||||||
|
};
|
14
resources/assets/tests/setup.js
Normal file
14
resources/assets/tests/setup.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import 'jest-extended';
|
||||||
|
import Vue from 'vue';
|
||||||
|
|
||||||
|
Vue.prototype.$t = key => key;
|
||||||
|
|
||||||
|
Vue.directive('t', (el, { value }) => {
|
||||||
|
if (typeof value === 'string') {
|
||||||
|
el.innerHTML = value;
|
||||||
|
} else if (typeof value === 'object') {
|
||||||
|
el.innerHTML = value.path;
|
||||||
|
} else {
|
||||||
|
throw new Error('[i18n] Invalid arguments in `v-t` directive.');
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user