fix: support reserved kotlin keywords #184
Annotations
2 errors
error: expect(received).toEqual(expected):
test/plugin.test.ts#L32
Expected: "package com.kotlin.generated\n\nimport com.expediagroup.graphql.generator.annotations.*\n\n@GraphQLValidObjectLocations(locations = [GraphQLValidObjectLocations.Locations.OBJECT])\ndata class TypeWithHardKotlinKeywords(\n val `as`: String? = null,\n val `break`: String? = null,\n val `is`: String? = null\n)\n\n@GraphQLValidObjectLocations(locations = [GraphQLValidObjectLocations.Locations.INPUT_OBJECT])\ndata class InputWithHardKotlinKeywords(\n val `continue`: String? = null,\n val `class`: String? = null,\n val `do`: String? = null\n)\n\nenum class EnumWithHardKotlinKeywords {\n `fun`,\n `package`,\n `val`;\n\n companion object {\n fun findByName(name: String, ignoreCase: Boolean = false): EnumWithHardKotlinKeywords? = values().find { it.name.equals(name, ignoreCase = ignoreCase) }\n }\n}\n\ninterface InterfaceWithHardKotlinKeywords {\n val `null`: String?\n val `return`: String?\n val `this`: String?\n}\n"
Received: "package com.kotlin.generated\n\nimport com.expediagroup.graphql.generator.annotations.*\n\n@GraphQLValidObjectLocations(locations = [GraphQLValidObjectLocations.Locations.OBJECT])\ndata class TypeWithHardKotlinKeywords(\n val as: String? = null,\n val break: String? = null,\n val is: String? = null\n)\n\n@GraphQLValidObjectLocations(locations = [GraphQLValidObjectLocations.Locations.INPUT_OBJECT])\ndata class InputWithHardKotlinKeywords(\n val continue: String? = null,\n val class: String? = null,\n val do: String? = null\n)\n\nenum class EnumWithHardKotlinKeywords {\n fun,\n package,\n val;\n\n companion object {\n fun findByName(name: String, ignoreCase: Boolean = false): EnumWithHardKotlinKeywords? = values().find { it.name.equals(name, ignoreCase = ignoreCase) }\n }\n}\n\ninterface InterfaceWithHardKotlinKeywords {\n val null: String?\n val return: String?\n val super: String?\n}\n"
at /home/runner/work/graphql-kotlin-codegen/graphql-kotlin-codegen/test/plugin.test.ts:32:5
|
Tests
Process completed with exit code 1.
|