Jobber/extractors/hiringcafe/tests/location.test.ts
Shaheer Sarfaraz 3da5ea35b4
Deduplicate shared helpers and enforce aliased imports (#228)
* Deduplicate string cleanup helpers and not-found responses

* Enforce aliased imports for infra and shared modules

* Enforce @client/@server aliases for deep relative imports

* Deduplicate visa sponsor and location filter definitions

* Use shared city filter export in extractor location checks
2026-02-22 16:13:52 +00:00

14 lines
571 B
TypeScript

import { shouldApplyStrictCityFilter } from "@shared/search-cities.js";
import { describe, expect, it } from "vitest";
describe("hiringcafe location query strictness", () => {
it("enables strict filtering when city differs from country", () => {
expect(shouldApplyStrictCityFilter("Leeds", "united kingdom")).toBe(true);
});
it("disables strict filtering when location is country-level", () => {
expect(shouldApplyStrictCityFilter("UK", "united kingdom")).toBe(false);
expect(shouldApplyStrictCityFilter("United States", "us")).toBe(false);
});
});