Commit ca65c015 authored by MrMan's avatar MrMan

Add marginally useful test for constants

parent 4020b086
import "should";
import _ from "lodash";
import System from "systemjs";
import "../config";
import "should";
import _ from "lodash";
const EXPECTED_ACTIONS = [
"authenticateWithTinder",
......
import System from "systemjs";
import "../config";
import "should";
import _ from "lodash";
const EXPECTED_CONSTANTS = [
"APP_BACKGROUND_CLASS",
"FB_AUTH_TOKEN_HREF",
"FB_CURRENT_USER_URL",
"LOCALSTORAGE_KEY_FB_AUTH_STORE_STATE",
"LOCALSTORAGE_KEY_FB_USER_STORE_STATE",
"LOCALSTORAGE_KEY_TINDER_AUTH_STORE_STATE",
"LOCALSTORAGE_KEY_TINDER_LOCATION_STORE_STATE",
"LOCALSTORAGE_KEY_TINDER_RECOMMENDATION_STORE_STATE",
"LOCALSTORAGE_KEY_TINDER_SENTIMENT_STORE_STATE",
"LOCALSTORAGE_KEY_TINDER_USER_STORE_STATE",
"LOCALSTORAGE_KEY_ERROR_STORE_STATE",
"SENTIMENT_LIKE",
"SENTIMENT_PASS",
"TINDER_AUTH_URL",
"TINDER_CLIENT_ID",
"TINDER_GENDER_FEMALE",
"TINDER_GENDER_MALE",
"TINDER_HEADERS_WITHOUT_AUTH_TOKEN",
"TINDER_LOCATION_URL",
"TINDER_MAX_FILTER_AGE",
"TINDER_MIN_FILTER_AGE",
"TINDER_PROFILE_URL",
"TINDER_RECS_URL",
"TINDER_SENTIMENT_URL"
];
describe("React constants", () => {
// Ensure that the generated constants export contains the functions we expect
it("Should contain all the constants we expect", (done) => {
System.import("./js/constants")
.then(constants => {
constants.default.should.have.keys(EXPECTED_CONSTANTS);
done();
})
.catch(done);
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment