@@ -5,6 +5,15 @@ const {sampleImages} = require('./test-data');
55describe ( 'Session Token' , ( ) => {
66
77 it ( 'can initialize an app with a session token, app id and user id' , done => {
8+ // Skip test if these aren't defined
9+ if (
10+ ! process . env . SESSION_TOKEN ||
11+ ! process . env . APP_ID ||
12+ ! process . env . USER_ID
13+ ) {
14+ return pending ( 'SESSION_TOKEN, APP_ID, or USER_ID not defined' ) ;
15+ }
16+
817 const anApp = new Clarifai . App ( {
918 sessionToken : process . env . SESSION_TOKEN ,
1019 appId : process . env . APP_ID ,
@@ -15,6 +24,15 @@ describe('Session Token', () => {
1524 } ) ;
1625
1726 it ( 'can make calls with a session token' , done => {
27+ // Skip test if these aren't defined
28+ if (
29+ ! process . env . SESSION_TOKEN ||
30+ ! process . env . CLARIFAI_USER_APP_ID ||
31+ ! process . env . USER_ID
32+ ) {
33+ return pending ( 'SESSION_TOKEN, CLARIFAI_USER_APP_ID, or USER_ID not defined' ) ;
34+ }
35+
1836 const anApp = new Clarifai . App ( {
1937 sessionToken : process . env . SESSION_TOKEN ,
2038 appId : process . env . CLARIFAI_USER_APP_ID ,
0 commit comments