File tree Expand file tree Collapse file tree 1 file changed +11
-20
lines changed Expand file tree Collapse file tree 1 file changed +11
-20
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import LicenseDropdown from "@/Components/LicenseDropdown.vue";
33import VueI18n from "vue-i18n" ;
44import Vuex from "vuex" ;
55import Buefy from "buefy" ;
6- import { doesNotReject } from "assert" ;
76
87describe ( "LicenseDropdown.vue" , ( ) => {
98 let wrapper ;
@@ -16,38 +15,31 @@ describe("LicenseDropdown.vue", () => {
1615 localVue . use ( Vuex ) ;
1716 localVue . use ( Buefy ) ;
1817
19- getters = {
20- shortName : state => {
21- return "foo" ;
22- } ,
23- fullName : state => {
24- return "foo-bar" ;
25- }
26- } ;
18+ const language = require ( "../../src/locales/en.json" ) ;
19+
20+ const i18n = new VueI18n ( {
21+ locale : "en" ,
22+ fallbackLocale : "en" ,
23+ messages : language
24+ } ) ;
2725
2826 store = new Vuex . Store ( {
2927 getters
3028 } ) ;
3129
32- const messages = require ( "@/locales/en.json" ) ;
33- const i18n = new VueI18n ( {
34- locale : "en" ,
35- fallbackLocale : "en" ,
36- messages : messages
30+ wrapper = mount ( LicenseDropdown , {
31+ localVue,
32+ store
3733 } ) ;
3834
3935 config . mocks . i18n = i18n ;
4036
4137 config . mocks . $t = key => {
4238 return i18n . messages [ key ] ;
4339 } ;
44- wrapper = mount ( LicenseDropdown , {
45- localVue,
46- store
47- } ) ;
4840 } ) ;
4941
50- it ( "Has the main field tag" , ( ) => {
42+ it ( "Has the field tag" , ( ) => {
5143 expect ( wrapper . contains ( ".license-dropdown" ) ) . toBe ( true ) ;
5244 } ) ;
5345
@@ -67,5 +59,4 @@ describe("LicenseDropdown.vue", () => {
6759 . at ( 0 )
6860 . trigger ( "input" ) ;
6961 } ) ;
70-
7162} ) ;
You can’t perform that action at this time.
0 commit comments