This commit is contained in:
Robert Schäfer 2019-06-06 23:43:15 +02:00
parent 08778f3798
commit de0bcd949a
3 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
import gql from 'graphql-tag' import gql from 'graphql-tag'
export default (i18n) => { export default i18n => {
const lang = i18n.locale().toUpperCase() const lang = i18n.locale().toUpperCase()
return gql(` return gql(`
query Post($filter: _PostFilter, $first: Int, $offset: Int) { query Post($filter: _PostFilter, $first: Int, $offset: Int) {

View File

@ -1,6 +1,6 @@
import gql from 'graphql-tag' import gql from 'graphql-tag'
export default (i18n) => { export default i18n => {
const lang = i18n.locale().toUpperCase() const lang = i18n.locale().toUpperCase()
return gql(` return gql(`
query User($id: ID!) { query User($id: ID!) {

View File

@ -20,7 +20,13 @@ describe('ProfileSlug', () => {
name: 'It is a post', name: 'It is a post',
}, },
$t: jest.fn(), $t: jest.fn(),
// If you mocking router, than don't use VueRouter with lacalVue: https://vue-test-utils.vuejs.org/guides/using-with-vue-router.html // If you mocking router, than don't use VueRouter with localVue: https://vue-test-utils.vuejs.org/guides/using-with-vue-router.html
$route: {
params: {
id: '4711',
slug: 'john-doe',
},
},
$router: { $router: {
history: { history: {
push: jest.fn(), push: jest.fn(),