@@ -7,7 +7,6 @@ const RuleTester = require('eslint').RuleTester
77const rule = require ( '../../../lib/rules/no-missing-keys' )
88
99const baseDir = './tests/fixtures/no-missing-keys/locales'
10- const resolve = file => `${ baseDir } /${ file } `
1110
1211const settings = {
1312 'vue-i18n' : {
@@ -68,8 +67,8 @@ tester.run('no-missing-keys', rule, {
6867 settings,
6968 code : `$t('missing')` ,
7069 errors : [
71- `'missing' does not exist in ' ${ resolve ( 'en.json' ) } ' ` ,
72- `'missing' does not exist in ' ${ resolve ( 'ja.json' ) } ' `
70+ `'missing' does not exist` ,
71+ `'missing' does not exist`
7372 ]
7473 } , {
7574 // using mustaches in template block
@@ -78,8 +77,8 @@ tester.run('no-missing-keys', rule, {
7877 <p>{{ $t('missing') }}</p>
7978 </template>` ,
8079 errors : [
81- `'missing' does not exist in ' ${ resolve ( 'en.json' ) } ' ` ,
82- `'missing' does not exist in ' ${ resolve ( 'ja.json' ) } ' `
80+ `'missing' does not exist` ,
81+ `'missing' does not exist`
8382 ]
8483 } , {
8584 // using custom directive in template block
@@ -88,8 +87,8 @@ tester.run('no-missing-keys', rule, {
8887 <p v-t="'missing'"></p>
8988 </template>` ,
9089 errors : [
91- `'missing' does not exist in ' ${ resolve ( 'en.json' ) } ' ` ,
92- `'missing' does not exist in ' ${ resolve ( 'ja.json' ) } ' `
90+ `'missing' does not exist` ,
91+ `'missing' does not exist`
9392 ]
9493 } , {
9594 // using <i18n> functional component in template block
@@ -100,8 +99,8 @@ tester.run('no-missing-keys', rule, {
10099 </div>
101100 </template>` ,
102101 errors : [
103- `'missing' does not exist in ' ${ resolve ( 'en.json' ) } ' ` ,
104- `'missing' does not exist in ' ${ resolve ( 'ja.json' ) } ' `
102+ `'missing' does not exist` ,
103+ `'missing' does not exist`
105104 ]
106105 } , {
107106 // settings.vue-i18n.localeDir' error
0 commit comments