fix(admin): prefer non-anonymized map locations
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { groupMapLocations, parseUserLocation, parseUserNetwork, projectWorldPoint } from "./user-location-map";
|
||||
import {
|
||||
MAP_LOCATION_CLASSIFICATIONS,
|
||||
groupMapLocations,
|
||||
parseUserLocation,
|
||||
parseUserNetwork,
|
||||
projectWorldPoint,
|
||||
} from "./user-location-map";
|
||||
|
||||
describe("user location map", () => {
|
||||
it("allows only clear and hosting observations as map locations", () => {
|
||||
expect(MAP_LOCATION_CLASSIFICATIONS).toEqual(["clear", "hosting"]);
|
||||
expect(MAP_LOCATION_CLASSIFICATIONS).not.toContain("vpn");
|
||||
expect(MAP_LOCATION_CLASSIFICATIONS).not.toContain("proxy");
|
||||
expect(MAP_LOCATION_CLASSIFICATIONS).not.toContain("tor");
|
||||
});
|
||||
|
||||
it("extracts a valid approximate location from cached IP intelligence", () => {
|
||||
expect(parseUserLocation({
|
||||
classification: "clear",
|
||||
|
||||
Reference in New Issue
Block a user