* 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
14 lines
567 B
TypeScript
14 lines
567 B
TypeScript
import { shouldApplyStrictCityFilter } from "@shared/search-cities.js";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
describe("adzuna 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);
|
|
});
|
|
});
|