Skip to content

Commit 6a8455a

Browse files
chore: add test for config.json
As config.json may be changed by mistake, add a unit test that verifies its content.
1 parent 9f1b1a2 commit 6a8455a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/config/config-json.ts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { assert } from "chai";
2+
describe("config.json", () => {
3+
const expectedData = {
4+
"DEBUG": false,
5+
"TYPESCRIPT_COMPILER_OPTIONS": {},
6+
"ANDROID_DEBUG_UI_MAC": "Google Chrome",
7+
"USE_POD_SANDBOX": false,
8+
"DISABLE_HOOKS": false,
9+
"UPLOAD_PLAYGROUND_FILES_ENDPOINT": "https://play.nativescript.org/api/files",
10+
"SHORTEN_URL_ENDPOINT": "https://play.nativescript.org/api/shortenurl?longUrl=%s",
11+
"INSIGHTS_URL_ENDPOINT": "https://play-server.nativescript.org/api/insights?ipAddress=%s",
12+
"WHOAMI_URL_ENDPOINT": "https://play.nativescript.org/api/whoami",
13+
"PREVIEW_APP_ENVIRONMENT": "live",
14+
"GA_TRACKING_ID": "UA-111455-51"
15+
};
16+
17+
it("validates content is correct", () => {
18+
const data = require("../../config/config.json");
19+
assert.deepEqual(data, expectedData, "Data in config.json is not correct. Is this expected?");
20+
});
21+
});

0 commit comments

Comments
 (0)