Skip to content

Commit

Permalink
Add tests for entirely invalid identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
iansw246 committed Oct 25, 2023
1 parent c1f8bdd commit b8053fa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/__snapshots__/test/test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -448845,6 +448845,7 @@ Generated by [AVA](https://avajs.dev).
export type நான்கூகல்மொழிப்பெயர்ப்பைபயன்படுத்தினேன் = string;␊
export type నేనుఅనువాదంఉపయోగించాను = string;␊
export type میںنےگوگلٹرانسلیٹاستعمالکیا1 = string;␊
export type NoName = number;␊
export type DoesnTHaveOrOr = string;␊
export interface 呵呵 {␊
Expand Down Expand Up @@ -448872,6 +448873,7 @@ Generated by [AVA](https://avajs.dev).
tamil?: நான்கூகல்மொழிப்பெயர்ப்பைபயன்படுத்தினேன்;␊
telugu?: నేనుఅనువాదంఉపయోగించాను;␊
urdu?: میںنےگوگلٹرانسلیٹاستعمالکیا1;␊
"✔✔✔"?: NoName;␊
refAndExtends?: Ე1;␊
unicodeEnums?: Ე2;␊
"🇦🇶 starts with and contains emoji"?: DoesnTHaveOrOr;␊
Expand Down
Binary file modified test/__snapshots__/test/test.ts.snap
Binary file not shown.
4 changes: 4 additions & 0 deletions test/e2e/unicode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ export const input = {
type: 'string',
title: 'میں نے گوگل ٹرانسلیٹ استعمال کیا۔',
},
'✔✔✔': {
type: 'integer',
title: '𝄇𝄇𝄇'
},
refAndExtends: {
$ref: 'test/resources/UnicodeSchemaΔЙק๗あ叶葉.json',
},
Expand Down
2 changes: 2 additions & 0 deletions test/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export function run() {
// Regional flags like England use emoji tag sequences
t.is(generateName(' 🏴󠁧󠁢󠁥󠁮󠁧󠁿 england 🏴󠁧󠁢󠁳󠁣󠁴󠁿', usedNames), 'England')

t.is(generateName('𝄇𝄇𝄇', usedNames), 'NoName')

// Index should increment:
t.is(generateName('a', usedNames), 'A1')
t.is(generateName('a', usedNames), 'A2')
Expand Down

0 comments on commit b8053fa

Please sign in to comment.