diff --git a/apps/photos/.env.development b/apps/photos/.env.development index 106263648..6d48d6220 100644 --- a/apps/photos/.env.development +++ b/apps/photos/.env.development @@ -76,4 +76,4 @@ # The path of the JSON file which contains the expected results of our # integration tests. See `upload.test.ts` for more details. -# NEXT_PUBLIC_EXPECTED_JSON_PATH = /path/to/dataset/expected.json +# NEXT_PUBLIC_ENTE_TEST_EXPECTED_JSON_PATH = /path/to/dataset/expected.json diff --git a/apps/photos/tests/upload.test.ts b/apps/photos/tests/upload.test.ts index 3a1ad6da5..ddaff714b 100644 --- a/apps/photos/tests/upload.test.ts +++ b/apps/photos/tests/upload.test.ts @@ -100,14 +100,13 @@ const FILE_NAME_TO_JSON_NAME = [ ]; export async function testUpload() { - if (!process.env.NEXT_PUBLIC_EXPECTED_JSON_PATH) { + const jsonPath = process.env.NEXT_PUBLIC_ENTE_TEST_EXPECTED_JSON_PATH; + if (!jsonPath) { throw Error( - 'upload test failed NEXT_PUBLIC_EXPECTED_JSON_PATH missing' + 'Please specify the NEXT_PUBLIC_ENTE_TEST_EXPECTED_JSON_PATH to run the upload tests' ); } - const expectedState = await import( - process.env.NEXT_PUBLIC_EXPECTED_JSON_PATH - ); + const expectedState = await import(jsonPath); if (!expectedState) { throw Error('upload test failed expectedState missing'); }