Fix the rest of the faker imports

- Some seems to work even the old way?!
This commit is contained in:
Wolfgang Huß 2022-05-03 14:22:10 +02:00
parent 0867d2bfca
commit 634249b407
5 changed files with 10 additions and 7 deletions

View File

@ -1,12 +1,12 @@
import { v4 as uuid } from 'uuid'
// Wolle import faker from 'faker'
const faker = require('@faker-js/faker')
import slugify from 'slug'
import { hashSync } from 'bcryptjs'
import { Factory } from 'rosie'
import { getDriver, getNeode } from './neo4j'
import CONFIG from '../config/index.js'
import generateInviteCode from '../schema/resolvers/helpers/generateInviteCode.js'
// import faker from 'faker' // this import is not working, why?
const faker = require('@faker-js/faker')
const neode = getNeode()

View File

@ -1,10 +1,11 @@
import faker from 'faker'
import sample from 'lodash/sample'
import { createTestClient } from 'apollo-server-testing'
import createServer from '../server'
import Factory from '../db/factories'
import { getNeode, getDriver } from '../db/neo4j'
import { gql } from '../helpers/jest'
// import faker from 'faker' // this import is not working, why?
const faker = require('@faker-js/faker')
const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']

View File

@ -2,7 +2,8 @@ import { storiesOf } from '@storybook/vue'
import { withA11y } from '@storybook/addon-a11y'
import HcCommentList from './CommentList.vue'
import helpers from '~/storybook/helpers'
import faker from 'faker'
// import faker from 'faker' // this import is not working, why?
const faker = require('@faker-js/faker')
helpers.init()

View File

@ -8,9 +8,10 @@ import TabNavigation from '~/components/_new/generic/TabNavigation/TabNavigation
import UserTeaser from '~/components/UserTeaser/UserTeaser'
import HcHashtag from '~/components/Hashtag/Hashtag'
import helpers from '~/storybook/helpers'
import faker from 'faker'
import { post } from '~/components/PostTeaser/PostTeaser.story.js'
import { user } from '~/components/UserTeaser/UserTeaser.story.js'
// import faker from 'faker' // this import is not working, why?
const faker = require('@faker-js/faker')
helpers.init()

View File

@ -1,6 +1,5 @@
import Vue from 'vue'
import Vuex from 'vuex'
import faker from 'faker'
import vuexI18n from 'vuex-i18n/dist/vuex-i18n.umd.js'
import Styleguide from '@human-connection/styleguide'
import Filters from '~/plugins/vue-filters'
@ -8,8 +7,9 @@ import Directives from '~/plugins/vue-directives'
import IziToast from '~/plugins/izi-toast'
import layout from './layout.vue'
import locales from '~/locales/index.js'
import '~/plugins/v-tooltip'
// import faker from 'faker' // this import is not working, why?
const faker = require('@faker-js/faker')
const helpers = {
init(options = {}) {