Removed @nuxtjs/dotenv (#1128)
* Removed `@nuxtjs/dotenv` * Removed `@nuxtjs/dotenv` * Fix broken tests Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
@@ -1,14 +1,24 @@
|
|||||||
import tab from "../tab"
|
import tab from "../tab"
|
||||||
import { mount } from "@vue/test-utils"
|
import { mount } from "@vue/test-utils"
|
||||||
|
|
||||||
const factory = (props, data) =>
|
const factory = (props, data) => {
|
||||||
mount(tab, {
|
if (data) {
|
||||||
propsData: props,
|
return mount(tab, {
|
||||||
data: data ? () => data : undefined,
|
propsData: props,
|
||||||
slots: {
|
data: () => data,
|
||||||
default: '<div id="testdiv"></div>',
|
slots: {
|
||||||
},
|
default: '<div id="testdiv"></div>',
|
||||||
})
|
},
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return mount(tab, {
|
||||||
|
propsData: props,
|
||||||
|
slots: {
|
||||||
|
default: '<div id="testdiv"></div>',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
describe("tab", () => {
|
describe("tab", () => {
|
||||||
test("mounts properly when needed props are passed in", () => {
|
test("mounts properly when needed props are passed in", () => {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
require("dotenv").config()
|
|
||||||
// Some helpful application constants.
|
// Some helpful application constants.
|
||||||
// TODO: Use these when rendering the pages (rather than just for head/meta tags...)
|
// TODO: Use these when rendering the pages (rather than just for head/meta tags...)
|
||||||
export const options = {
|
export const options = {
|
||||||
@@ -119,8 +118,6 @@ export default {
|
|||||||
buildModules: [
|
buildModules: [
|
||||||
// https://pwa.nuxtjs.org
|
// https://pwa.nuxtjs.org
|
||||||
"@nuxtjs/pwa",
|
"@nuxtjs/pwa",
|
||||||
// Doc: https://github.com/nuxt-community/dotenv-module
|
|
||||||
"@nuxtjs/dotenv",
|
|
||||||
// Doc: https://github.com/nuxt-community/analytics-module
|
// Doc: https://github.com/nuxt-community/analytics-module
|
||||||
"@nuxtjs/google-analytics",
|
"@nuxtjs/google-analytics",
|
||||||
// Doc: https://github.com/nuxt-community/gtm-module
|
// Doc: https://github.com/nuxt-community/gtm-module
|
||||||
@@ -168,13 +165,13 @@ export default {
|
|||||||
keepOnHover: true,
|
keepOnHover: true,
|
||||||
},
|
},
|
||||||
googleAnalytics: {
|
googleAnalytics: {
|
||||||
id: process.env.GA_ID || "UA-61422507-4",
|
id: process.env.GA_ID,
|
||||||
},
|
},
|
||||||
gtm: {
|
gtm: {
|
||||||
id: process.env.GTM_ID || "GTM-NMKVBMV",
|
id: process.env.GTM_ID,
|
||||||
},
|
},
|
||||||
sitemap: {
|
sitemap: {
|
||||||
hostname: process.env.BASE_URL || "https://hoppscotch.io/",
|
hostname: process.env.BASE_URL,
|
||||||
},
|
},
|
||||||
robots: {
|
robots: {
|
||||||
UserAgent: "*",
|
UserAgent: "*",
|
||||||
@@ -182,17 +179,6 @@ export default {
|
|||||||
Allow: "/",
|
Allow: "/",
|
||||||
Sitemap: `${process.env.BASE_URL}sitemap.xml`,
|
Sitemap: `${process.env.BASE_URL}sitemap.xml`,
|
||||||
},
|
},
|
||||||
env: {
|
|
||||||
API_KEY: process.env.API_KEY,
|
|
||||||
AUTH_DOMAIN: process.env.AUTH_DOMAIN,
|
|
||||||
DATABASE_URL: process.env.DATABASE_URL,
|
|
||||||
PROJECT_ID: process.env.PROJECT_ID,
|
|
||||||
STORAGE_BUCKET: process.env.STORAGE_BUCKET,
|
|
||||||
MESSAGING_SENDER_ID: process.env.MESSAGING_SENDER_ID,
|
|
||||||
APP_ID: process.env.APP_ID,
|
|
||||||
MEASUREMENT_ID: process.env.MEASUREMENT_ID,
|
|
||||||
BASE_URL: process.env.BASE_URL,
|
|
||||||
},
|
|
||||||
i18n: {
|
i18n: {
|
||||||
locales: [
|
locales: [
|
||||||
{
|
{
|
||||||
@@ -311,4 +297,19 @@ export default {
|
|||||||
generate: {
|
generate: {
|
||||||
fallback: true,
|
fallback: true,
|
||||||
},
|
},
|
||||||
|
publicRuntimeConfig: {
|
||||||
|
GA_ID: process.env.GA_ID || "UA-61422507-4",
|
||||||
|
GTM_ID: process.env.GTM_ID || "GTM-NMKVBMV",
|
||||||
|
BASE_URL: process.env.BASE_URL || "/",
|
||||||
|
},
|
||||||
|
privateRuntimeConfig: {
|
||||||
|
API_KEY: process.env.API_KEY,
|
||||||
|
AUTH_DOMAIN: process.env.AUTH_DOMAIN,
|
||||||
|
DATABASE_URL: process.env.DATABASE_URL,
|
||||||
|
PROJECT_ID: process.env.PROJECT_ID,
|
||||||
|
STORAGE_BUCKET: process.env.STORAGE_BUCKET,
|
||||||
|
MESSAGING_SENDER_ID: process.env.MESSAGING_SENDER_ID,
|
||||||
|
APP_ID: process.env.APP_ID,
|
||||||
|
MEASUREMENT_ID: process.env.MEASUREMENT_ID,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
16
package-lock.json
generated
16
package-lock.json
generated
@@ -2317,16 +2317,6 @@
|
|||||||
"defu": "^3.1.0"
|
"defu": "^3.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@nuxtjs/dotenv": {
|
|
||||||
"version": "1.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@nuxtjs/dotenv/-/dotenv-1.4.1.tgz",
|
|
||||||
"integrity": "sha512-DpdObsvRwC8d89I9mzz6pBg6e/PEXHazDM57DOI1mmML2ZjHfQ/DvkjlSzUL7T+TnW3b/a4Ks5wQx08DqFBmeQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"consola": "^2.10.1",
|
|
||||||
"dotenv": "^8.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@nuxtjs/google-analytics": {
|
"@nuxtjs/google-analytics": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@nuxtjs/google-analytics/-/google-analytics-2.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@nuxtjs/google-analytics/-/google-analytics-2.4.0.tgz",
|
||||||
@@ -3091,9 +3081,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@vue/test-utils": {
|
"@vue/test-utils": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.0.5.tgz",
|
||||||
"integrity": "sha512-uIdDqFauzNJWlhltLSZU+P3uHEgUQczklSv2b1EKC7JzxBg9OY/5sx8UyuJwBD+zuxidhFZ4SjTuPgr8cdf63w==",
|
"integrity": "sha512-P2x8kXwqfTXesAdfJQN146V1S3QD3Xv9wYZ1B09Oecmg7I3Fpqqo1CwfIn5ivwuXyBPQWFDH4vyBHynnYjIkRg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"dom-event-types": "^1.0.0",
|
"dom-event-types": "^1.0.0",
|
||||||
|
|||||||
@@ -50,12 +50,11 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.11.4",
|
"@babel/core": "^7.11.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@nuxtjs/dotenv": "^1.4.1",
|
|
||||||
"@nuxtjs/google-analytics": "^2.4.0",
|
"@nuxtjs/google-analytics": "^2.4.0",
|
||||||
"@nuxtjs/pwa": "^3.0.2",
|
"@nuxtjs/pwa": "^3.0.2",
|
||||||
"@nuxtjs/svg": "^0.1.12",
|
"@nuxtjs/svg": "^0.1.12",
|
||||||
"@testing-library/jest-dom": "^5.11.4",
|
"@testing-library/jest-dom": "^5.11.4",
|
||||||
"@vue/test-utils": "^1.0.4",
|
"@vue/test-utils": "^1.0.5",
|
||||||
"babel-core": "^7.0.0-bridge.0",
|
"babel-core": "^7.0.0-bridge.0",
|
||||||
"babel-jest": "^26.3.0",
|
"babel-jest": "^26.3.0",
|
||||||
"eslint": "^7.7.0",
|
"eslint": "^7.7.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user