diff --git a/backend/src/db/factories.js b/backend/src/db/factories.js index 1a21df541..3e164d51b 100644 --- a/backend/src/db/factories.js +++ b/backend/src/db/factories.js @@ -2,11 +2,10 @@ import { v4 as uuid } from 'uuid' import slugify from 'slug' import { hashSync } from 'bcryptjs' import { Factory } from 'rosie' +import faker from '@faker-js/faker' 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() diff --git a/backend/src/db/seed.js b/backend/src/db/seed.js index 6499e7e5a..786ad6fc8 100644 --- a/backend/src/db/seed.js +++ b/backend/src/db/seed.js @@ -1,11 +1,10 @@ import sample from 'lodash/sample' import { createTestClient } from 'apollo-server-testing' import createServer from '../server' +import faker from '@faker-js/faker' 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'] diff --git a/webapp/components/CommentList/CommentList.story.js b/webapp/components/CommentList/CommentList.story.js index 84017710d..50a2b1d1b 100644 --- a/webapp/components/CommentList/CommentList.story.js +++ b/webapp/components/CommentList/CommentList.story.js @@ -1,9 +1,8 @@ +import faker from '@faker-js/faker' 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' // this import is not working, why? -const faker = require('@faker-js/faker') helpers.init() diff --git a/webapp/components/_new/generic/TabNavigation/TabNavigator.story.js b/webapp/components/_new/generic/TabNavigation/TabNavigator.story.js index 98213f4df..6da7a5763 100644 --- a/webapp/components/_new/generic/TabNavigation/TabNavigator.story.js +++ b/webapp/components/_new/generic/TabNavigation/TabNavigator.story.js @@ -1,3 +1,4 @@ +import faker from '@faker-js/faker' import { storiesOf } from '@storybook/vue' import { withA11y } from '@storybook/addon-a11y' import HcEmpty from '~/components/Empty/Empty' @@ -10,8 +11,6 @@ import HcHashtag from '~/components/Hashtag/Hashtag' import helpers from '~/storybook/helpers' 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() diff --git a/webapp/storybook/helpers.js b/webapp/storybook/helpers.js index f36a43061..e53e1d554 100644 --- a/webapp/storybook/helpers.js +++ b/webapp/storybook/helpers.js @@ -2,14 +2,13 @@ import Vue from 'vue' import Vuex from 'vuex' import vuexI18n from 'vuex-i18n/dist/vuex-i18n.umd.js' import Styleguide from '@human-connection/styleguide' +import faker from '@faker-js/faker' import Filters from '~/plugins/vue-filters' 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 = {}) {