Skip to content

Commit 31546fd

Browse files
committed
Log
1 parent 1b14303 commit 31546fd

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
console.log("RAN ALGOLIA MOCK");
12
export const client = {
23
partialUpdateObjects: jest.fn(),
34
};

packages/skin-database/algolia.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { algoliasearch } from "algoliasearch";
22
import { ALGOLIA_ACCOUNT, ALGOLIA_KEY } from "./config";
33

4-
if (!ALGOLIA_ACCOUNT || !ALGOLIA_KEY) {
5-
throw new Error("Algolia account and key must be defined in config.js");
6-
}
4+
console.log("RAN ALGOLIA", ALGOLIA_ACCOUNT, ALGOLIA_KEY);
75

86
export const client = algoliasearch(ALGOLIA_ACCOUNT, ALGOLIA_KEY);

packages/skin-database/api/__tests__/graphql.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1+
console.log("RAN GRAPHQL TESTS");
12
import { knex } from "../../db";
23
import SkinModel from "../../data/SkinModel";
34
import * as S3 from "../../s3";
45
import { processUserUploads } from "../processUserUploads";
56
import UserContext from "../../data/UserContext";
67
import { client } from "../../algolia";
8+
console.log("RAN GRAPHQL TESTS ALGOLIA IMPORT");
79
import { createYogaInstance } from "../../app/graphql/yoga";
810
import { YogaServerInstance } from "graphql-yoga";
911
jest.mock("../../s3");
1012
jest.mock("../../algolia");
13+
console.log("RAN GRAPHQL TESTS ALGOLIA MOCK");
1114
jest.mock("../processUserUploads");
1215
jest.mock("../auth");
1316

packages/skin-database/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export const INSTAGRAM_ACCOUNT_ID = env("INSTAGRAM_ACCOUNT_ID");
3030
export const SECRET = env("SECRET");
3131
export const NODE_ENV = env("NODE_ENV") || "production";
3232

33+
console.log("RAN CONFIG", ALGOLIA_ACCOUNT);
34+
3335
function env(key: string): string {
3436
const value = process.env[key];
3537
if (!value) {

packages/skin-database/jest-setup.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ global.TextEncoder = TextEncoder;
44
global.TextDecoder = TextDecoder;
55

66
// eslint-disable-next-line no-constant-condition
7-
if (true) {
8-
throw new Error("HELLO FROM jest-setup");
9-
}
107

118
// In the real app, these are set via .env
129
process.env.LOCAL_FILE_CACHE = "<DUMMY>";
@@ -36,3 +33,5 @@ process.env.INSTAGRAM_ACCESS_TOKEN = "<DUMMY>";
3633
process.env.INSTAGRAM_ACCOUNT_ID = "<DUMMY>";
3734
process.env.MASTODON_ACCESS_TOKEN = "<DUMMY>";
3835
process.env.SECRET = "<DUMMY>";
36+
37+
console.log("RAN JEST SETUP", process.env.ALGOLIA_INDEX);

0 commit comments

Comments
 (0)