		const tPropertyNamesAndProperties = jsonSchemaToType({
			type: "object",
			propertyNames: { type: "string", minLength: 3 },
			properties: {
				a: { type: "boolean" },
				abc: { type: "number" }
			}
		})

		attest(tPropertyNamesAndProperties.expression).snap(
			"{ [string >= 3]: unknown, a?: never, abc?: number, + (undeclared): reject }"
		)
	})

	it("propertyNames & properties & required", () => {
		const tPropertyNamesAndRequiredValid = jsonSchemaToType({
			type: "object",
			propertyNames: { type: "string", minLength: 3 },
			properties: { abc: { type: "number" } },
			required: ["abc"]
		})
		attest(tPropertyNamesAndRequiredValid.expression).snap(
			"{ [string >= 3]: unknown, abc: number, + (undeclared): reject }"
		)

		attest(() =>
			jsonSchemaToType({
				type: "object",
				propertyNames: { type: "string", minLength: 3 },
				properties: { a: { type: "boolean" } },
				required: ["a"]
			})
		).throws(
			writeJsonSchemaObjectNonConformingKeyAndPropertyNamesMessage(
				"a",
				"string >= 3"
			)
		)
	})
})
