Skip to content

Commit

Permalink
test: encoding issues (#42)
Browse files Browse the repository at this point in the history
* test: encoding issues

* Update contentProcessing.test.ts

* Update src/helpers/__tests__/contentProcessing.test.ts

Co-authored-by: Aakodal <[email protected]>

Co-authored-by: Aakodal <[email protected]>
  • Loading branch information
Mesteery and Aakodal authored May 7, 2021
1 parent 2b15429 commit 56e453f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/helpers/__tests__/contentProcessing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ describe(processContent, () => {
expect(results?.[0]).toEqual(`${results?.[1].slice(0, -3)}python>`);
});

it("should work with utf8", async () => {
console.error = jest.fn();
const results = await processContent(
// eslint-disable-next-line max-len
"```Ḽơᶉëᶆ ȋṕšᶙṁ ḍỡḽǭᵳ ʂǐť ӓṁệẗ, ĉṓɲṩḙċťᶒțûɾ ấɖḯƥĭṩčįɳġ ḝłįʈ, șếᶑ ᶁⱺ ẽḭŭŝḿꝋď ṫĕᶆᶈṓɍ ỉñḉīḑȋᵭṵńť ṷŧ ḹẩḇőꝛế éȶ đꝍꞎôꝛȇ ᵯáꞡᶇā ąⱡîɋṹẵ.``` ```py\ná'bç'dé'f'g'h'k```",
1,
);
expect(console.error).not.toBeCalled();
expect(results).toEqual(expect.stringMatching(`${binUrl()} ${binUrl("py")}`));
});

it("should make the corrects changes", async () => {
expect(await processContent("see : `this\nis\nmultiline !`", MAX_LINES)).toEqual(
expect.stringMatching(new RegExp(`see : ${binUrl()}`)),
Expand Down

0 comments on commit 56e453f

Please sign in to comment.