File tree Expand file tree Collapse file tree 5 files changed +9
-6
lines changed
Expand file tree Collapse file tree 5 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1+ console . log ( "RAN ALGOLIA MOCK" ) ;
12export const client = {
23 partialUpdateObjects : jest . fn ( ) ,
34} ;
Original file line number Diff line number Diff line change 11import { algoliasearch } from "algoliasearch" ;
22import { 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
86export const client = algoliasearch ( ALGOLIA_ACCOUNT , ALGOLIA_KEY ) ;
Original file line number Diff line number Diff line change 1+ console . log ( "RAN GRAPHQL TESTS" ) ;
12import { knex } from "../../db" ;
23import SkinModel from "../../data/SkinModel" ;
34import * as S3 from "../../s3" ;
45import { processUserUploads } from "../processUserUploads" ;
56import UserContext from "../../data/UserContext" ;
67import { client } from "../../algolia" ;
8+ console . log ( "RAN GRAPHQL TESTS ALGOLIA IMPORT" ) ;
79import { createYogaInstance } from "../../app/graphql/yoga" ;
810import { YogaServerInstance } from "graphql-yoga" ;
911jest . mock ( "../../s3" ) ;
1012jest . mock ( "../../algolia" ) ;
13+ console . log ( "RAN GRAPHQL TESTS ALGOLIA MOCK" ) ;
1114jest . mock ( "../processUserUploads" ) ;
1215jest . mock ( "../auth" ) ;
1316
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ export const INSTAGRAM_ACCOUNT_ID = env("INSTAGRAM_ACCOUNT_ID");
3030export const SECRET = env ( "SECRET" ) ;
3131export const NODE_ENV = env ( "NODE_ENV" ) || "production" ;
3232
33+ console . log ( "RAN CONFIG" , ALGOLIA_ACCOUNT ) ;
34+
3335function env ( key : string ) : string {
3436 const value = process . env [ key ] ;
3537 if ( ! value ) {
Original file line number Diff line number Diff line change @@ -4,9 +4,6 @@ global.TextEncoder = TextEncoder;
44global . 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
129process . env . LOCAL_FILE_CACHE = "<DUMMY>" ;
@@ -36,3 +33,5 @@ process.env.INSTAGRAM_ACCESS_TOKEN = "<DUMMY>";
3633process . env . INSTAGRAM_ACCOUNT_ID = "<DUMMY>" ;
3734process . env . MASTODON_ACCESS_TOKEN = "<DUMMY>" ;
3835process . env . SECRET = "<DUMMY>" ;
36+
37+ console . log ( "RAN JEST SETUP" , process . env . ALGOLIA_INDEX ) ;
You can’t perform that action at this time.
0 commit comments